]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/thread_state.cpp
update
[l4.git] / kernel / fiasco / src / kern / thread_state.cpp
1 INTERFACE:
2
3 // When changing these constants, change them also in shared/shortcut.h!
4 enum Thread_state
5 {
6   Thread_invalid          = 0,    // tcb unallocated
7   Thread_ready            = 0x1,  // can be scheduled
8   Thread_drq_ready        = 0x2,
9   Thread_ready_mask       = Thread_ready | Thread_drq_ready,
10
11   Thread_send_wait           = 0x4,  // waiting to send a message
12   Thread_receive_wait        = 0x8,  // waiting for a message
13   Thread_receive_in_progress = 0x10, // receiving a message (passively)
14
15   Thread_ipc_mask            = Thread_send_wait | Thread_receive_wait
16                              | Thread_receive_in_progress,
17
18   Thread_ipc_transfer        = 0x20,
19
20   // the ipc handshake bits needs to be in the first byte,
21   // the shortcut depends on it
22
23   Thread_cancel               = 0x80,// state has been changed -- cancel activity
24   Thread_timeout              = 0x100,
25
26   Thread_full_ipc_mask        = Thread_ipc_mask | Thread_cancel
27                               | Thread_timeout | Thread_ipc_transfer,
28
29   Thread_ipc_abort_mask       = Thread_cancel | Thread_timeout | Thread_ipc_transfer,
30
31   Thread_dead                 = 0x200,// tcb allocated, but inactive (not in any q)
32   Thread_suspended            = 0x400,// thread must not execute user code
33   // 0x800, 0x1000 are free
34   //Thread_delayed_deadline     = 0x2000, // delayed until periodic deadline
35   //Thread_delayed_ipc          = 0x4000, // delayed until periodic ipc event
36   Thread_fpu_owner            = 0x8000, // currently owns the fpu
37   Thread_alien                = 0x10000, // Thread is an alien, is not allowed
38                                      // to do system calls
39   Thread_dis_alien            = 0x20000, // Thread is an alien, however the next
40                                      // system call is allowed
41   Thread_in_exception         = 0x40000, // Thread has sent an exception but still
42                                      // got no reply
43
44   Thread_drq_wait             = 0x100000, // Thread polls for DRQs
45   Thread_waiting              = 0x200000, // Thread waits for a lock
46
47   Thread_vcpu_enabled         = 0x400000,
48   Thread_vcpu_fpu_disabled    = 0x1000000,
49   Thread_ext_vcpu_enabled     = 0x2000000,
50 };