__thread_alloc_and_run()c
| 2025-1-4
本文字數 47閱讀時長 1 分鐘
  • __thread_alloc_and_run()
    • Find the free thread whose state is THREAD_STATE_FREE.
      • If found, set thread’s state to THREAD_STATE_ACTIVE.
    • Set the current thread ID (l->curr_thread) to the founded thread ID.
    • Call init_regs() to initialize the registers to be restored of the thread.
      • thread->regs.epc is set to pc.
    • Call thread_resume() to resume the thread.
Loading...
目錄