Changeset 151c050 in mainline for kernel/generic/src/proc/thread.c
- Timestamp:
- 2024-01-15T14:33:03Z (18 months ago)
- Branches:
- master
- Children:
- c7ceacf
- Parents:
- 8996582
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-04-15 16:15:29)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-15 14:33:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r8996582 r151c050 314 314 current_initialize((current_t *) thread->kstack); 315 315 316 ipl_t ipl = interrupts_disable();317 thread->saved_ipl = interrupts_read();318 interrupts_restore(ipl);319 320 316 str_cpy(thread->name, THREAD_NAME_BUFLEN, name); 321 317 … … 518 514 } 519 515 520 irq_spinlock_lock(&THREAD->lock, true); 521 THREAD->state = Exiting; 522 irq_spinlock_unlock(&THREAD->lock, true); 523 524 scheduler(); 525 526 panic("should never be reached"); 516 scheduler_enter(Exiting); 517 unreachable(); 527 518 } 528 519 … … 623 614 } 624 615 625 ipl_t ipl = interrupts_disable(); 626 irq_spinlock_lock(&THREAD->lock, false); 627 THREAD->state = Sleeping; 628 scheduler_locked(ipl); 616 scheduler_enter(Sleeping); 629 617 630 618 if (deadline != DEADLINE_NEVER && !timeout_unregister(&timeout)) { … … 736 724 737 725 (void) waitq_sleep_timeout(&wq, usec); 726 } 727 728 /** Allow other threads to run. */ 729 void thread_yield(void) 730 { 731 assert(THREAD != NULL); 732 scheduler_enter(Running); 738 733 } 739 734
Note:
See TracChangeset
for help on using the changeset viewer.