1 |
/* Round robin scheduling policy. |
/* Round robin scheduling policy. |
2 |
Copyright 1999, 2000, 2001 Johan Rydberg, jrydberg@opencores.org. |
Copyright 1999, 2000, 2001, 2002 Johan Rydberg, jrydberg@rtmk.org. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
101 |
/* Insert thread into scheduling policy's run queue and update RUN_MAP. */ |
/* Insert thread into scheduling policy's run queue and update RUN_MAP. */ |
102 |
|
|
103 |
spin_lock (&sp->interlock); |
spin_lock (&sp->interlock); |
104 |
whichq = thread->sched_priority; |
whichq = (15 - thread->sched_priority); |
105 |
queue_remove (&sp->run_queues [whichq], thread, struct thread *, runq); |
queue_remove (&sp->run_queues [whichq], thread, struct thread *, runq); |
106 |
empty_p = queue_empty (&sp->run_queues [whichq]); |
empty_p = queue_empty (&sp->run_queues [whichq]); |
107 |
|
|