summaryrefslogtreecommitdiff
path: root/kern/thread_i.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-03-04 15:40:44 +0100
committerRichard Braun <rbraun@sceen.net>2017-03-04 15:40:44 +0100
commit6fecd5cef7a2f549b4d81053a3b80365ed7828f5 (patch)
treec33dd6dc6acca615c606238608109acf05bf89ec /kern/thread_i.h
parent4d09b9e73ab6d5f2c1365736b81ab0600584c7f0 (diff)
kern/thread: fix thread_setscheduler
Make thread_setscheduler correctly handle a transient state made possible by the way the thread_wakeup function works.
Diffstat (limited to 'kern/thread_i.h')
-rw-r--r--kern/thread_i.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/kern/thread_i.h b/kern/thread_i.h
index af278b26..55f96082 100644
--- a/kern/thread_i.h
+++ b/kern/thread_i.h
@@ -18,6 +18,8 @@
#ifndef _KERN_THREAD_I_H
#define _KERN_THREAD_I_H
+#include <stdbool.h>
+
#include <kern/condition_types.h>
#include <kern/cpumap.h>
#include <kern/list_types.h>
@@ -93,6 +95,7 @@ struct thread {
/* Sleep/wakeup synchronization members */
struct thread_runq *runq;
+ bool in_runq;
const void *wchan_addr;
const char *wchan_desc;
unsigned short state;