Skip to content
Commit 6ac33f2b authored by Allan Stephens's avatar Allan Stephens Committed by Anas Nashif
Browse files

kernel: Introduce sys_thread_busy_wait() API



Provides a way for a fiber or task to busy wait for a specified
period of time. This is useful in situations where a delay needs
to be performed without switching execution to another context,
such as:

1) It would take longer to switch to another context and then switch
   back again than to simply busy wait.

2) A delay is required by the kernel's main task (i.e. the nanokernel's
   background task or the microkernel's idle task). This task is not
   allowed to voluntarily relinquish the CPU because this would leave
   the kernel with nothing to execute in its place.

Change-Id: Icbe28613014f659e9528893ae58f7b8008c18a61
Original-work-by: default avatarJeff Blais <jeff.blais@windriver.com>
Further-adapted-by: default avatarBenjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
parent 136c18e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment