Rev 2183 | Rev 2285 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2183 | Rev 2216 | ||
---|---|---|---|
Line 448... | Line 448... | ||
448 | 448 | ||
449 | default: |
449 | default: |
450 | /* |
450 | /* |
451 | * Entering state is unexpected. |
451 | * Entering state is unexpected. |
452 | */ |
452 | */ |
453 | panic("tid%d: unexpected state %s\n", THREAD->tid, |
453 | panic("tid%llu: unexpected state %s\n", THREAD->tid, |
454 | thread_states[THREAD->state]); |
454 | thread_states[THREAD->state]); |
455 | break; |
455 | break; |
456 | } |
456 | } |
457 | 457 | ||
458 | THREAD = NULL; |
458 | THREAD = NULL; |
Line 501... | Line 501... | ||
501 | 501 | ||
502 | spinlock_lock(&THREAD->lock); |
502 | spinlock_lock(&THREAD->lock); |
503 | THREAD->state = Running; |
503 | THREAD->state = Running; |
504 | 504 | ||
505 | #ifdef SCHEDULER_VERBOSE |
505 | #ifdef SCHEDULER_VERBOSE |
506 | printf("cpu%d: tid %d (priority=%d, ticks=%lld, nrdy=%ld)\n", |
506 | printf("cpu%d: tid %llu (priority=%d, ticks=%llu, nrdy=%ld)\n", |
507 | CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks, |
507 | CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks, |
508 | atomic_get(&CPU->nrdy)); |
508 | atomic_get(&CPU->nrdy)); |
509 | #endif |
509 | #endif |
510 | 510 | ||
511 | /* |
511 | /* |
Line 637... | Line 637... | ||
637 | /* |
637 | /* |
638 | * Ready t on local CPU |
638 | * Ready t on local CPU |
639 | */ |
639 | */ |
640 | spinlock_lock(&t->lock); |
640 | spinlock_lock(&t->lock); |
641 | #ifdef KCPULB_VERBOSE |
641 | #ifdef KCPULB_VERBOSE |
642 | printf("kcpulb%d: TID %d -> cpu%d, nrdy=%ld, " |
642 | printf("kcpulb%d: TID %llu -> cpu%d, nrdy=%ld, " |
643 | "avg=%nd\n", CPU->id, t->tid, CPU->id, |
643 | "avg=%nd\n", CPU->id, t->tid, CPU->id, |
644 | atomic_get(&CPU->nrdy), |
644 | atomic_get(&CPU->nrdy), |
645 | atomic_get(&nrdy) / config.cpu_active); |
645 | atomic_get(&nrdy) / config.cpu_active); |
646 | #endif |
646 | #endif |
647 | t->flags |= THREAD_FLAG_STOLEN; |
647 | t->flags |= THREAD_FLAG_STOLEN; |
Line 720... | Line 720... | ||
720 | } |
720 | } |
721 | printf("\trq[%d]: ", i); |
721 | printf("\trq[%d]: ", i); |
722 | for (cur = r->rq_head.next; cur != &r->rq_head; |
722 | for (cur = r->rq_head.next; cur != &r->rq_head; |
723 | cur = cur->next) { |
723 | cur = cur->next) { |
724 | t = list_get_instance(cur, thread_t, rq_link); |
724 | t = list_get_instance(cur, thread_t, rq_link); |
725 | printf("%d(%s) ", t->tid, |
725 | printf("%llu(%s) ", t->tid, |
726 | thread_states[t->state]); |
726 | thread_states[t->state]); |
727 | } |
727 | } |
728 | printf("\n"); |
728 | printf("\n"); |
729 | spinlock_unlock(&r->lock); |
729 | spinlock_unlock(&r->lock); |
730 | } |
730 | } |