Changeset 48d14222 in mainline
- Timestamp:
- 2007-06-04T19:50:44Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 473e693
- Parents:
- cb4afd8b
- Location:
- kernel/generic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/proc/thread.h
rcb4afd8b r48d14222 82 82 /** After a thread calls thread_exit(), it is put into Exiting state. */ 83 83 Exiting, 84 /** Threads that were not detached but exited are in the JoinMe state. */85 JoinMe84 /** Threads that were not detached but exited are Lingering. */ 85 Lingering 86 86 } state_t; 87 87 -
kernel/generic/src/proc/scheduler.c
rcb4afd8b r48d14222 416 416 spinlock_unlock(&THREAD->join_wq.lock); 417 417 418 THREAD->state = JoinMe;418 THREAD->state = Lingering; 419 419 spinlock_unlock(&THREAD->lock); 420 420 } -
kernel/generic/src/proc/thread.c
rcb4afd8b r48d14222 79 79 "Entering", 80 80 "Exiting", 81 " JoinMe"81 "Lingering" 82 82 }; 83 83 … … 357 357 void thread_destroy(thread_t *t) 358 358 { 359 ASSERT(t->state == Exiting || t->state == JoinMe);359 ASSERT(t->state == Exiting || t->state == Lingering); 360 360 ASSERT(t->task); 361 361 ASSERT(t->cpu); … … 521 521 /** Detach thread. 522 522 * 523 * Mark the thread as detached, if the thread is already in the JoinMe state,524 * deallocate its resources.523 * Mark the thread as detached, if the thread is already in the Lingering 524 * state, deallocate its resources. 525 525 * 526 526 * @param t Thread to be detached. … … 537 537 spinlock_lock(&t->lock); 538 538 ASSERT(!t->detached); 539 if (t->state == JoinMe) {539 if (t->state == Lingering) { 540 540 thread_destroy(t); /* unlocks &t->lock */ 541 541 interrupts_restore(ipl);
Note:
See TracChangeset
for help on using the changeset viewer.