Rev 1264 | Rev 1576 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1264 | Rev 1380 | ||
---|---|---|---|
Line 419... | Line 419... | ||
419 | priority = THREAD->priority; |
419 | priority = THREAD->priority; |
420 | spinlock_unlock(&THREAD->lock); |
420 | spinlock_unlock(&THREAD->lock); |
421 | 421 | ||
422 | relink_rq(priority); |
422 | relink_rq(priority); |
423 | 423 | ||
424 | spinlock_lock(&THREAD->lock); |
- | |
425 | - | ||
426 | /* |
424 | /* |
427 | * If both the old and the new task are the same, lots of work is avoided. |
425 | * If both the old and the new task are the same, lots of work is avoided. |
428 | */ |
426 | */ |
429 | if (TASK != THREAD->task) { |
427 | if (TASK != THREAD->task) { |
430 | as_t *as1 = NULL; |
428 | as_t *as1 = NULL; |
Line 452... | Line 450... | ||
452 | } |
450 | } |
453 | TASK = THREAD->task; |
451 | TASK = THREAD->task; |
454 | before_task_runs(); |
452 | before_task_runs(); |
455 | } |
453 | } |
456 | 454 | ||
- | 455 | spinlock_lock(&THREAD->lock); |
|
457 | THREAD->state = Running; |
456 | THREAD->state = Running; |
458 | 457 | ||
459 | #ifdef SCHEDULER_VERBOSE |
458 | #ifdef SCHEDULER_VERBOSE |
460 | printf("cpu%d: tid %d (priority=%d,ticks=%lld,nrdy=%ld)\n", CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks, atomic_get(&CPU->nrdy)); |
459 | printf("cpu%d: tid %d (priority=%d,ticks=%lld,nrdy=%ld)\n", CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks, atomic_get(&CPU->nrdy)); |
461 | #endif |
460 | #endif |