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.

[参考译文] RTOS/CC3200SDK:使用 POSIX 在线程之间进行切换的方法是什么

Guru**** 2381500 points
Other Parts Discussed in Thread: CC3200SDK, CC3200
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/808452/rtos-cc3200sdk-what-are-the-ways-to-switch-between-threads-using-posix

器件型号:CC3200SDK
Thread 中讨论的其他器件: CC3200

工具/软件:TI-RTOS

您好!

我在线程之间切换的唯一方法是使用中的 usleep()函数 。 两个线程都具有连续 while 循环。 这是使用 POSIX 接口在线程之间切换的唯一方法吗?

谢谢。   

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    SCHED_Yield ()也可用于触发调度程序,以将正在运行的线程替换为另一个具有相同优先级的挂起线程。

    pthread_setschedparam()可用于降低线程优先级。

    CC3200SDK 不支持上述 POSIX API。

    如果您使用的是 CC3200、则需要使用等效的直接 RTOS API (例如 TIRTOS 的 Task_Yield ()))。

    BR、

    Kobi