diff --git a/osal/cmsis_os/cmsis_os.c b/osal/cmsis_os/cmsis_os.c index d2d5f0d9..ade04fe0 100644 --- a/osal/cmsis_os/cmsis_os.c +++ b/osal/cmsis_os/cmsis_os.c @@ -122,6 +122,17 @@ osStatus osThreadSetPriority(osThreadId thread_id, osPriority priority) return errno_knl2cmsis(tos_task_prio_change((k_task_t *)thread_id, priority_cmsis2knl(priority))); } +/** + * @brief Pass control to next thread that is in state READY. + * @return status code that indicates the execution status of the function. + */ +osStatus osThreadYield(void) +{ + tos_task_yield(); + + return osOK; +} + /** * @brief Get current priority of an active thread. * @param[in] thread_id thread ID obtained by \ref osThreadCreate or \ref osThreadGetId.