Rev 2292 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2292 | Rev 2307 | ||
|---|---|---|---|
| Line 51... | Line 51... | ||
| 51 | 51 | ||
| 52 | extern char *thread_states[]; |
52 | extern char *thread_states[]; |
| 53 | 53 | ||
| 54 | /* Thread flags */ |
54 | /* Thread flags */ |
| 55 | 55 | ||
| 56 | /** Thread cannot be migrated to another CPU. */ |
56 | /** Thread cannot be migrated to another CPU. |
| - | 57 | * |
|
| - | 58 | * When using this flag, the caller must set cpu in the thread_t |
|
| - | 59 | * structure manually before calling thread_ready (even on uniprocessor). |
|
| - | 60 | */ |
|
| 57 | #define THREAD_FLAG_WIRED (1 << 0) |
61 | #define THREAD_FLAG_WIRED (1 << 0) |
| 58 | /** Thread was migrated to another CPU and has not run yet. */ |
62 | /** Thread was migrated to another CPU and has not run yet. */ |
| 59 | #define THREAD_FLAG_STOLEN (1 << 1) |
63 | #define THREAD_FLAG_STOLEN (1 << 1) |
| 60 | /** Thread executes in userspace. */ |
64 | /** Thread executes in userspace. */ |
| 61 | #define THREAD_FLAG_USPACE (1 << 2) |
65 | #define THREAD_FLAG_USPACE (1 << 2) |
| Line 191... | Line 195... | ||
| 191 | bool uncounted; |
195 | bool uncounted; |
| 192 | 196 | ||
| 193 | /** Thread's priority. Implemented as index to CPU->rq */ |
197 | /** Thread's priority. Implemented as index to CPU->rq */ |
| 194 | int priority; |
198 | int priority; |
| 195 | /** Thread ID. */ |
199 | /** Thread ID. */ |
| 196 | uint32_t tid; |
200 | thread_id_t tid; |
| 197 | 201 | ||
| 198 | /** Architecture-specific data. */ |
202 | /** Architecture-specific data. */ |
| 199 | thread_arch_t arch; |
203 | thread_arch_t arch; |
| 200 | 204 | ||
| 201 | /** Thread's kernel stack. */ |
205 | /** Thread's kernel stack. */ |
| Line 246... | Line 250... | ||
| 246 | 250 | ||
| 247 | /** Fpu context slab cache. */ |
251 | /** Fpu context slab cache. */ |
| 248 | extern slab_cache_t *fpu_context_slab; |
252 | extern slab_cache_t *fpu_context_slab; |
| 249 | 253 | ||
| 250 | /* Thread syscall prototypes. */ |
254 | /* Thread syscall prototypes. */ |
| 251 | unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name); |
255 | extern unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, thread_id_t *uspace_thread_id); |
| 252 | unative_t sys_thread_exit(int uspace_status); |
256 | extern unative_t sys_thread_exit(int uspace_status); |
| - | 257 | extern unative_t sys_thread_get_id(thread_id_t *uspace_thread_id); |
|
| 253 | 258 | ||
| 254 | #endif |
259 | #endif |
| 255 | 260 | ||
| 256 | /** @} |
261 | /** @} |
| 257 | */ |
262 | */ |