Rev 1171 | Rev 1184 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1171 | Rev 1177 | ||
---|---|---|---|
Line 234... | Line 234... | ||
234 | spinlock_unlock(&t->task->lock); |
234 | spinlock_unlock(&t->task->lock); |
235 | 235 | ||
236 | spinlock_unlock(&t->lock); |
236 | spinlock_unlock(&t->lock); |
237 | 237 | ||
238 | spinlock_lock(&threads_lock); |
238 | spinlock_lock(&threads_lock); |
239 | btree_remove(&threads_btree, (__native) t, NULL); |
239 | btree_remove(&threads_btree, (btree_key_t) ((__address ) t), NULL); |
240 | spinlock_unlock(&threads_lock); |
240 | spinlock_unlock(&threads_lock); |
241 | 241 | ||
242 | slab_free(thread_slab, t); |
242 | slab_free(thread_slab, t); |
243 | } |
243 | } |
244 | 244 | ||
Line 310... | Line 310... | ||
310 | /* |
310 | /* |
311 | * Register this thread in the system-wide list. |
311 | * Register this thread in the system-wide list. |
312 | */ |
312 | */ |
313 | ipl = interrupts_disable(); |
313 | ipl = interrupts_disable(); |
314 | spinlock_lock(&threads_lock); |
314 | spinlock_lock(&threads_lock); |
315 | btree_insert(&threads_btree, (__native) t, (void *) t, NULL); |
315 | btree_insert(&threads_btree, (btree_key_t) ((__address) t), (void *) t, NULL); |
316 | spinlock_unlock(&threads_lock); |
316 | spinlock_unlock(&threads_lock); |
317 | 317 | ||
318 | /* |
318 | /* |
319 | * Attach to the containing task. |
319 | * Attach to the containing task. |
320 | */ |
320 | */ |
Line 444... | Line 444... | ||
444 | */ |
444 | */ |
445 | bool thread_exists(thread_t *t) |
445 | bool thread_exists(thread_t *t) |
446 | { |
446 | { |
447 | btree_node_t *leaf; |
447 | btree_node_t *leaf; |
448 | 448 | ||
449 | return btree_search(&threads_btree, (__native) t, &leaf) != NULL; |
449 | return btree_search(&threads_btree, (btree_key_t) ((__address) t), &leaf) != NULL; |
450 | } |
450 | } |
451 | 451 | ||
452 | /** Process syscall to create new thread. |
452 | /** Process syscall to create new thread. |
453 | * |
453 | * |
454 | */ |
454 | */ |