sched: add a thread flag to indicate when a thread is scheduled on a runqueue
this prevents runqueue corruption that can occur if rq_enqueue is called on a thread that's already on a runqueue.
This commit is contained in:
@@ -14,8 +14,11 @@ enum thread_state {
|
||||
};
|
||||
|
||||
enum thread_flags {
|
||||
/* this thread has exhausted its quantum and is due to be re-scheduled.
|
||||
*/
|
||||
THREAD_F_NEED_RESCHED = 0x01u,
|
||||
THREAD_F_NO_PREEMPT = 0x02u,
|
||||
/* this thread is currently scheduled (i.e. is present on a runqueue) */
|
||||
THREAD_F_SCHEDULED = 0x04u,
|
||||
};
|
||||
|
||||
struct thread {
|
||||
|
||||
Reference in New Issue
Block a user