doc: scheduler: define reschedule point
This term needs to be defined to support documenting the effect of various API calls on scheduler selection of the running thread. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
49bcafc9f5
commit
76995b61ac
1 changed files with 11 additions and 0 deletions
|
@ -12,6 +12,17 @@ Concepts
|
||||||
The scheduler determines which thread is allowed to execute
|
The scheduler determines which thread is allowed to execute
|
||||||
at any point in time; this thread is known as the **current thread**.
|
at any point in time; this thread is known as the **current thread**.
|
||||||
|
|
||||||
|
There are various points in time when the scheduler is given an
|
||||||
|
opportunity to change the identity of the current thread. These points
|
||||||
|
are called **reschedule points**. Some potential reschedule points are:
|
||||||
|
|
||||||
|
- transition of a thread to the :ref:`ready state <thread_states>`, for
|
||||||
|
example by :cpp:func:`k_sem_give` or :cpp:func:`k_thread_start`
|
||||||
|
- transition of a thread from running state to a suspended or waiting
|
||||||
|
state, for example by :cpp:func:`k_sem_take` or :cpp:func:`k_sleep`
|
||||||
|
- return to thread context after processing an interrupt
|
||||||
|
- when a running thread invokes :cpp:func:`k_yield()`
|
||||||
|
|
||||||
Whenever the scheduler changes the identity of the current thread,
|
Whenever the scheduler changes the identity of the current thread,
|
||||||
or when execution of the current thread is replaced by an ISR,
|
or when execution of the current thread is replaced by an ISR,
|
||||||
the kernel first saves the current thread's CPU register values.
|
the kernel first saves the current thread's CPU register values.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue