请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CC3200SDK Thread 中讨论的其他器件: CC3200
工具/软件:TI-RTOS
您好!
我在线程之间切换的唯一方法是使用中的 usleep()函数 。 两个线程都具有连续 while 循环。 这是使用 POSIX 接口在线程之间切换的唯一方法吗?
谢谢。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
SCHED_Yield ()也可用于触发调度程序,以将正在运行的线程替换为另一个具有相同优先级的挂起线程。
pthread_setschedparam()可用于降低线程优先级。
CC3200SDK 不支持上述 POSIX API。
如果您使用的是 CC3200、则需要使用等效的直接 RTOS API (例如 TIRTOS 的 Task_Yield ()))。
BR、
Kobi