Rev 906 | Rev 1066 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 906 | Rev 1062 | ||
---|---|---|---|
Line 57... | Line 57... | ||
57 | extern char *thread_states[]; |
57 | extern char *thread_states[]; |
58 | 58 | ||
59 | #define X_WIRED (1<<0) |
59 | #define X_WIRED (1<<0) |
60 | #define X_STOLEN (1<<1) |
60 | #define X_STOLEN (1<<1) |
61 | 61 | ||
- | 62 | /** Thread structure. There is one per thread. */ |
|
62 | struct thread { |
63 | struct thread { |
- | 64 | char *name; |
|
- | 65 | ||
63 | link_t rq_link; /**< Run queue link. */ |
66 | link_t rq_link; /**< Run queue link. */ |
64 | link_t wq_link; /**< Wait queue link. */ |
67 | link_t wq_link; /**< Wait queue link. */ |
65 | link_t th_link; /**< Links to threads within containing task. */ |
68 | link_t th_link; /**< Links to threads within containing task. */ |
66 | link_t threads_link; /**< Link to the list of all threads. */ |
69 | link_t threads_link; /**< Link to the list of all threads. */ |
67 | 70 | ||
Line 123... | Line 126... | ||
123 | extern spinlock_t threads_lock; |
126 | extern spinlock_t threads_lock; |
124 | 127 | ||
125 | extern link_t threads_head; /**< List of all threads in the system. */ |
128 | extern link_t threads_head; /**< List of all threads in the system. */ |
126 | 129 | ||
127 | extern void thread_init(void); |
130 | extern void thread_init(void); |
128 | extern thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, int flags); |
131 | extern thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, int flags, char *name); |
129 | extern void thread_ready(thread_t *t); |
132 | extern void thread_ready(thread_t *t); |
130 | extern void thread_exit(void); |
133 | extern void thread_exit(void); |
131 | 134 | ||
132 | extern void thread_sleep(__u32 sec); |
135 | extern void thread_sleep(__u32 sec); |
133 | extern void thread_usleep(__u32 usec); |
136 | extern void thread_usleep(__u32 usec); |