Rev 2071 | Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2080 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | #include <proc/uarg.h> |
51 | #include <proc/uarg.h> |
52 | 52 | ||
53 | #define THREAD_STACK_SIZE STACK_SIZE |
53 | #define THREAD_STACK_SIZE STACK_SIZE |
54 | 54 | ||
55 | /** Thread states. */ |
55 | /** Thread states. */ |
56 | enum state { |
56 | typedef enum { |
57 | Invalid, /**< It is an error, if thread is found in this state. */ |
57 | Invalid, /**< It is an error, if thread is found in this state. */ |
58 | Running, /**< State of a thread that is currently executing on some CPU. */ |
58 | Running, /**< State of a thread that is currently executing on some CPU. */ |
59 | Sleeping, /**< Thread in this state is waiting for an event. */ |
59 | Sleeping, /**< Thread in this state is waiting for an event. */ |
60 | Ready, /**< State of threads in a run queue. */ |
60 | Ready, /**< State of threads in a run queue. */ |
61 | Entering, /**< Threads are in this state before they are first readied. */ |
61 | Entering, /**< Threads are in this state before they are first readied. */ |
62 | Exiting, /**< After a thread calls thread_exit(), it is put into Exiting state. */ |
62 | Exiting, /**< After a thread calls thread_exit(), it is put into Exiting state. */ |
63 | Undead /**< Threads that were not detached but exited are in the Undead state. */ |
63 | Undead /**< Threads that were not detached but exited are in the Undead state. */ |
64 | }; |
64 | } state_t; |
65 | 65 | ||
66 | extern char *thread_states[]; |
66 | extern char *thread_states[]; |
67 | 67 | ||
68 | /** Join types. */ |
68 | /** Join types. */ |
69 | typedef enum { |
69 | typedef enum { |