Changeset 266294a9 in mainline for generic/src/proc/scheduler.c
- Timestamp:
- 2006-02-05T17:01:03Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5c9a08b
- Parents:
- 9b9e385
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/proc/scheduler.c
r9b9e385 r266294a9 238 238 * switch to a new thread. 239 239 * 240 * Assume THREAD->lock is held. 240 241 */ 241 242 static void scheduler_separated_stack(void) … … 254 255 255 256 case Exiting: 256 frame_free((__address) THREAD->kstack); 257 if (THREAD->ustack) { 258 frame_free((__address) THREAD->ustack); 259 } 260 261 /* 262 * Detach from the containing task. 263 */ 264 spinlock_lock(&TASK->lock); 265 list_remove(&THREAD->th_link); 266 spinlock_unlock(&TASK->lock); 267 268 spinlock_unlock(&THREAD->lock); 269 270 spinlock_lock(&threads_lock); 271 list_remove(&THREAD->threads_link); 272 spinlock_unlock(&threads_lock); 273 274 spinlock_lock(&CPU->lock); 275 if(CPU->fpu_owner==THREAD) 276 CPU->fpu_owner=NULL; 277 spinlock_unlock(&CPU->lock); 278 279 free(THREAD); 280 257 thread_destroy(THREAD); 281 258 break; 282 259 283 260 case Sleeping: 284 261 /*
Note:
See TracChangeset
for help on using the changeset viewer.