fix a bug in cmsis-os v1.02 implement

This commit is contained in:
mculover666
2020-07-17 10:44:48 +08:00
parent fe435089ed
commit dd2fb48232

View File

@@ -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.