Rev 212 | Rev 214 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 212 | Rev 213 | ||
---|---|---|---|
Line 133... | Line 133... | ||
133 | * If this queue is empty, try a lower-priority queue. |
133 | * If this queue is empty, try a lower-priority queue. |
134 | */ |
134 | */ |
135 | spinlock_unlock(&r->lock); |
135 | spinlock_unlock(&r->lock); |
136 | continue; |
136 | continue; |
137 | } |
137 | } |
138 | 138 | ||
139 | /* avoid deadlock with relink_rq() */ |
139 | /* avoid deadlock with relink_rq() */ |
140 | if (!spinlock_trylock(&CPU->lock)) { |
140 | if (!spinlock_trylock(&CPU->lock)) { |
141 | /* |
141 | /* |
142 | * Unlock r and try again. |
142 | * Unlock r and try again. |
143 | */ |
143 | */ |
Line 410... | Line 410... | ||
410 | 410 | ||
411 | #ifdef SCHEDULER_VERBOSE |
411 | #ifdef SCHEDULER_VERBOSE |
412 | printf("cpu%d: tid %d (pri=%d,ticks=%d,nrdy=%d)\n", CPU->id, THREAD->tid, THREAD->pri, THREAD->ticks, CPU->nrdy); |
412 | printf("cpu%d: tid %d (pri=%d,ticks=%d,nrdy=%d)\n", CPU->id, THREAD->tid, THREAD->pri, THREAD->ticks, CPU->nrdy); |
413 | #endif |
413 | #endif |
414 | 414 | ||
- | 415 | /* |
|
- | 416 | * Copy the knowledge of CPU, TASK, THREAD and preemption counter to thread's stack. |
|
- | 417 | */ |
|
415 | the_copy(THE, (the_t *) THREAD->kstack); |
418 | the_copy(THE, (the_t *) THREAD->kstack); |
416 | 419 | ||
417 | context_restore(&THREAD->saved_context); |
420 | context_restore(&THREAD->saved_context); |
418 | /* not reached */ |
421 | /* not reached */ |
419 | } |
422 | } |