标题: 基于STM32F103的MDK5_RTOS创建线程 [打印本页] 作者: liuzhu 时间: 2015-9-10 00:38 标题: 基于STM32F103的MDK5_RTOS创建线程 前面已经正式介绍了如何建立一个带有RTOS的工程,那么现在开始探究一下,如何在使用了RTOS的程序中建立线程。
经过查阅,发现想要创建一个线程的话,那么只要调用创建线程的函数就可以了。一下就是其 原型。
/// Create a thread and add it to Active Threads and set it tostate READY.
/// \param[in] thread_def thread definitionreferenced with \ref osThread.
/// \param[in] argument pointerthat is passed to the thread function as start argument.
/// \return thread ID for reference by other functions or NULLin case of error.
osThreadId osThreadCreate (const osThreadDef_t *thread_def,void *argument);