Rev 2268 | Rev 2446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2268 | Rev 2440 | ||
---|---|---|---|
Line 61... | Line 61... | ||
61 | #define THREAD_FLAG_WIRED (1 << 0) |
61 | #define THREAD_FLAG_WIRED (1 << 0) |
62 | /** Thread was migrated to another CPU and has not run yet. */ |
62 | /** Thread was migrated to another CPU and has not run yet. */ |
63 | #define THREAD_FLAG_STOLEN (1 << 1) |
63 | #define THREAD_FLAG_STOLEN (1 << 1) |
64 | /** Thread executes in userspace. */ |
64 | /** Thread executes in userspace. */ |
65 | #define THREAD_FLAG_USPACE (1 << 2) |
65 | #define THREAD_FLAG_USPACE (1 << 2) |
- | 66 | /** Thread will be attached by the caller. */ |
|
- | 67 | #define THREAD_FLAG_NOATTACH (1 << 3) |
|
66 | 68 | ||
67 | /** Thread states. */ |
69 | /** Thread states. */ |
68 | typedef enum { |
70 | typedef enum { |
69 | /** It is an error, if thread is found in this state. */ |
71 | /** It is an error, if thread is found in this state. */ |
70 | Invalid, |
72 | Invalid, |
Line 218... | Line 220... | ||
218 | extern btree_t threads_btree; |
220 | extern btree_t threads_btree; |
219 | 221 | ||
220 | extern void thread_init(void); |
222 | extern void thread_init(void); |
221 | extern thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, |
223 | extern thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, |
222 | int flags, char *name, bool uncounted); |
224 | int flags, char *name, bool uncounted); |
- | 225 | extern void thread_attach(thread_t *t, task_t *task); |
|
223 | extern void thread_ready(thread_t *t); |
226 | extern void thread_ready(thread_t *t); |
224 | extern void thread_exit(void) __attribute__((noreturn)); |
227 | extern void thread_exit(void) __attribute__((noreturn)); |
225 | 228 | ||
226 | #ifndef thread_create_arch |
229 | #ifndef thread_create_arch |
227 | extern void thread_create_arch(thread_t *t); |
230 | extern void thread_create_arch(thread_t *t); |