Changeset dfa4be62 in mainline for kernel/generic/src/proc/thread.c
- Timestamp:
- 2024-01-21T16:23:19Z (14 months ago)
- Branches:
- master
- Children:
- d23712e
- Parents:
- a3d87b9
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-03-28 17:40:43)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-21 16:23:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
ra3d87b9 rdfa4be62 115 115 thread_t *thread = (thread_t *) obj; 116 116 117 irq_spinlock_initialize(&thread->lock, "thread_t_lock");118 117 link_initialize(&thread->rq_link); 119 118 link_initialize(&thread->wq_link); … … 197 196 void thread_wire(thread_t *thread, cpu_t *cpu) 198 197 { 199 i rq_spinlock_lock(&thread->lock, true);198 ipl_t ipl = interrupts_disable(); 200 199 atomic_set_unordered(&thread->cpu, cpu); 201 200 thread->nomigrate++; 202 i rq_spinlock_unlock(&thread->lock, true);201 interrupts_restore(ipl); 203 202 } 204 203 … … 579 578 void thread_migration_disable(void) 580 579 { 580 ipl_t ipl = interrupts_disable(); 581 581 582 assert(THREAD); 582 583 583 THREAD->nomigrate++; 584 585 interrupts_restore(ipl); 584 586 } 585 587 … … 587 589 void thread_migration_enable(void) 588 590 { 591 ipl_t ipl = interrupts_disable(); 592 589 593 assert(THREAD); 590 594 assert(THREAD->nomigrate > 0); … … 592 596 if (THREAD->nomigrate > 0) 593 597 THREAD->nomigrate--; 598 599 interrupts_restore(ipl); 594 600 } 595 601
Note:
See TracChangeset
for help on using the changeset viewer.