Rev 1702 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1702 | Rev 1780 | ||
|---|---|---|---|
| Line 140... | Line 140... | ||
| 140 | int flags; /**< Thread's flags. */ |
140 | int flags; /**< Thread's flags. */ |
| 141 | 141 | ||
| 142 | cpu_t *cpu; /**< Thread's CPU. */ |
142 | cpu_t *cpu; /**< Thread's CPU. */ |
| 143 | task_t *task; /**< Containing task. */ |
143 | task_t *task; /**< Containing task. */ |
| 144 | 144 | ||
| 145 | __u64 ticks; /**< Ticks before preemption. */ |
145 | uint64_t ticks; /**< Ticks before preemption. */ |
| 146 | 146 | ||
| 147 | int priority; /**< Thread's priority. Implemented as index to CPU->rq */ |
147 | int priority; /**< Thread's priority. Implemented as index to CPU->rq */ |
| 148 | __u32 tid; /**< Thread ID. */ |
148 | uint32_t tid; /**< Thread ID. */ |
| 149 | 149 | ||
| 150 | thread_arch_t arch; /**< Architecture-specific data. */ |
150 | thread_arch_t arch; /**< Architecture-specific data. */ |
| 151 | 151 | ||
| 152 | __u8 *kstack; /**< Thread's kernel stack. */ |
152 | uint8_t *kstack; /**< Thread's kernel stack. */ |
| 153 | }; |
153 | }; |
| 154 | 154 | ||
| 155 | /** Thread list lock. |
155 | /** Thread list lock. |
| 156 | * |
156 | * |
| 157 | * This lock protects all link_t structures chained in threads_head. |
157 | * This lock protects all link_t structures chained in threads_head. |
| Line 169... | Line 169... | ||
| 169 | 169 | ||
| 170 | #ifndef thread_create_arch |
170 | #ifndef thread_create_arch |
| 171 | extern void thread_create_arch(thread_t *t); |
171 | extern void thread_create_arch(thread_t *t); |
| 172 | #endif |
172 | #endif |
| 173 | 173 | ||
| 174 | extern void thread_sleep(__u32 sec); |
174 | extern void thread_sleep(uint32_t sec); |
| 175 | extern void thread_usleep(__u32 usec); |
175 | extern void thread_usleep(uint32_t usec); |
| 176 | 176 | ||
| 177 | #define thread_join(t) thread_join_timeout((t), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE) |
177 | #define thread_join(t) thread_join_timeout((t), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE) |
| 178 | extern int thread_join_timeout(thread_t *t, __u32 usec, int flags); |
178 | extern int thread_join_timeout(thread_t *t, uint32_t usec, int flags); |
| 179 | extern void thread_detach(thread_t *t); |
179 | extern void thread_detach(thread_t *t); |
| 180 | 180 | ||
| 181 | extern void thread_register_call_me(void (* call_me)(void *), void *call_me_with); |
181 | extern void thread_register_call_me(void (* call_me)(void *), void *call_me_with); |
| 182 | extern void thread_print_list(void); |
182 | extern void thread_print_list(void); |
| 183 | extern void thread_destroy(thread_t *t); |
183 | extern void thread_destroy(thread_t *t); |
| Line 185... | Line 185... | ||
| 185 | 185 | ||
| 186 | /* Fpu context slab cache */ |
186 | /* Fpu context slab cache */ |
| 187 | extern slab_cache_t *fpu_context_slab; |
187 | extern slab_cache_t *fpu_context_slab; |
| 188 | 188 | ||
| 189 | /** Thread syscall prototypes. */ |
189 | /** Thread syscall prototypes. */ |
| 190 | __native sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name); |
190 | unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name); |
| 191 | __native sys_thread_exit(int uspace_status); |
191 | unative_t sys_thread_exit(int uspace_status); |
| 192 | 192 | ||
| 193 | #endif |
193 | #endif |
| 194 | 194 | ||
| 195 | /** @} |
195 | /** @} |
| 196 | */ |
196 | */ |