Changes in kernel/generic/src/proc/scheduler.c [4621d23:3cfe2b8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/scheduler.c
r4621d23 r3cfe2b8 205 205 loop: 206 206 207 if (atomic_ get(&CPU->nrdy) == 0) {207 if (atomic_load(&CPU->nrdy) == 0) { 208 208 /* 209 209 * For there was nothing to run, the CPU goes to sleep … … 327 327 ipl = interrupts_disable(); 328 328 329 if (atomic_ get(&haltstate))329 if (atomic_load(&haltstate)) 330 330 halt(); 331 331 … … 530 530 log(LF_OTHER, LVL_DEBUG, 531 531 "cpu%u: tid %" PRIu64 " (priority=%d, ticks=%" PRIu64 532 ", nrdy=% " PRIua ")", CPU->id, THREAD->tid, THREAD->priority,533 THREAD->ticks, atomic_ get(&CPU->nrdy));532 ", nrdy=%zu)", CPU->id, THREAD->tid, THREAD->priority, 533 THREAD->ticks, atomic_load(&CPU->nrdy)); 534 534 #endif 535 535 … … 566 566 void kcpulb(void *arg) 567 567 { 568 atomic_count_t average;569 atomic_count_t rdy;568 size_t average; 569 size_t rdy; 570 570 571 571 /* … … 587 587 * 588 588 */ 589 average = atomic_ get(&nrdy) / config.cpu_active + 1;590 rdy = atomic_ get(&CPU->nrdy);589 average = atomic_load(&nrdy) / config.cpu_active + 1; 590 rdy = atomic_load(&CPU->nrdy); 591 591 592 592 if (average <= rdy) 593 593 goto satisfied; 594 594 595 atomic_count_t count = average - rdy;595 size_t count = average - rdy; 596 596 597 597 /* … … 616 616 continue; 617 617 618 if (atomic_ get(&cpu->nrdy) <= average)618 if (atomic_load(&cpu->nrdy) <= average) 619 619 continue; 620 620 … … 678 678 "kcpulb%u: TID %" PRIu64 " -> cpu%u, " 679 679 "nrdy=%ld, avg=%ld", CPU->id, t->tid, 680 CPU->id, atomic_ get(&CPU->nrdy),681 atomic_ get(&nrdy) / config.cpu_active);680 CPU->id, atomic_load(&CPU->nrdy), 681 atomic_load(&nrdy) / config.cpu_active); 682 682 #endif 683 683 … … 705 705 } 706 706 707 if (atomic_ get(&CPU->nrdy)) {707 if (atomic_load(&CPU->nrdy)) { 708 708 /* 709 709 * Be a little bit light-weight and let migrated threads run. … … 739 739 irq_spinlock_lock(&cpus[cpu].lock, true); 740 740 741 printf("cpu%u: address=%p, nrdy=% " PRIua ", needs_relink=%zu\n",742 cpus[cpu].id, &cpus[cpu], atomic_ get(&cpus[cpu].nrdy),741 printf("cpu%u: address=%p, nrdy=%zu, needs_relink=%zu\n", 742 cpus[cpu].id, &cpus[cpu], atomic_load(&cpus[cpu].nrdy), 743 743 cpus[cpu].needs_relink); 744 744
Note:
See TracChangeset
for help on using the changeset viewer.