Changeset efed95a3 in mainline for kernel/generic/src/proc/scheduler.c
- Timestamp:
- 2024-01-20T17:09:00Z (4 months ago)
- Branches:
- master
- Children:
- 3d84734
- Parents:
- 286da52
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-20 16:12:46)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-20 17:09:00)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/scheduler.c
r286da52 refed95a3 311 311 312 312 irq_spinlock_lock(&THREAD->lock, false); 313 assert( THREAD->cpu== CPU);313 assert(atomic_get_unordered(&THREAD->cpu) == CPU); 314 314 315 315 THREAD->state = Running; … … 387 387 388 388 assert(thread->state == Running); 389 assert( thread->cpu== CPU);389 assert(atomic_get_unordered(&thread->cpu) == CPU); 390 390 391 391 int i = (thread->priority < RQ_COUNT - 1) ? … … 411 411 412 412 /* Prefer the CPU on which the thread ran last */ 413 if (!thread->cpu) 414 thread->cpu = CPU; 415 416 cpu_t *cpu = thread->cpu; 413 cpu_t *cpu = atomic_get_unordered(&thread->cpu); 414 415 if (!cpu) { 416 cpu = CPU; 417 atomic_set_unordered(&thread->cpu, CPU); 418 } 417 419 418 420 irq_spinlock_unlock(&thread->lock, false); … … 656 658 657 659 thread->stolen = true; 658 thread->cpu = CPU;660 atomic_set_unordered(&thread->cpu, CPU); 659 661 660 662 irq_spinlock_unlock(&thread->lock, false);
Note:
See TracChangeset
for help on using the changeset viewer.