rt_thread_t rt_thread_find (char *name) ; 查找线程名字,成功返回线程句柄,失败返回NULL
rt_err_t rt_thread_delay (rt_tick_t tick); 阻塞tick长时间,进入suspend队列,被定时器唤醒
rt_err_t rt_thread_sleep (rt_tick_t tick); 同上(sleep被delay完整调用)
rt_err_t rt_thread_yield (void); 立即释放cpu,线程进入准备队列尾
rt_err_t rt_thread_delete (rt_thread_t thread) ; 删除thread线程,资源被idle线程回收
rt_err_t rt_thread_detach (rt_thread_t thread); 同上
rt_thread_t rt_thread_create (const char *name, 动态创建线程,线程名
void (*entry)(void *parameter),线程所运行函数入口
void *parameter,
rt_uint32_t stack_size,线程栈
rt_uint8_t priority, 线程优先级,255最低优先级,0最高优先级
rt_uint32_t tick) 时间片
rt_err_t rt_thread_init(struct rt_thread *thread,静态创建线程
const char *name, 线程名
void (*entry)(void *parameter), 线程所运行函数入口
void *parameter,
void *stack_start,栈基址地址
rt_uint32_t stack_size,线程栈
rt_uint8_t priority,线程优先级,255最低优先级,0最高优先级
rt_uint32_t tick) 时间片
rt_err_t rt_thread_startup(rt_thread_t thread); 启动线程,实际调用唤醒函数
rt_thread_t rt_thread_self(void); 返回当前线程句柄
static void rt_thread_exit(void); 线程退出
rt_err_t rt_thread_control(rt_thread_t thread, rt_uint8_t cmd, void *arg);改变线程配置
RT_THREAD_CTRL_CHANGE_PRIORITY 改变优先级
RT_THREAD_CTRL_STARTUP 线程启动
RT_THREAD_CTRL_CLOSE 线程关闭
rt_err_t rt_thread_suspend(rt_thread_t thread); 将线程放进suspend队尾挂起
rt_err_t rt_thread_resume(rt_thread_t thread); 唤醒线程
void rt_thread_timeout(void *parameter); 超时唤醒