fix a bug in cmsis-os v1.02 implement
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user