|
之前RTX还是创建任务,现在的API函数怎么都变成线程?有点像rt-thread了。。这学习跨度了
void Thread_1 (void const *arg); // function prototype for Thread_1osThreadDef (Thread_1, osPriorityNormal, 1, 0); // define Thread_1 void ThreadCreate_example (void)
{ osThreadId id; id = osThreadCreate (osThread (Thread_1), NULL);
// create the thread if (id == NULL) { // handle thread creation // Failed to create a thread }
: osThreadTerminate (id); // stop the thread} |
|