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.

[参考译文] CC3220SF:SemaphoreP_PEND 与 SEM_WAIT

Guru**** 2481465 points


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

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1358383/cc3220sf-semaphorep_pend-vs-sem_wait

器件型号:CC3220SF

SemaphoreP_PEND 与 SEM_WAIT

我看到了这两个函数的源代码、但在 SDK 中 、一些库使用 sem_wait 、而有些库使用 SemaphoreP_pend。(SL 库使用 sem_wait、器件库使用 SemaphoreP_pend)

为什么会这样呢? 为什么没有一致性?

 应用程序应该使用哪种方式?

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

     SDK 低级别(外设)驱动程序始终使用面向 OS 的称为 DPL 的适配层(SemaphoreP_PEND 就是这个层)

    当 我们决定对 SimpleLink SDK 使用 POSIX (例如 SEM_WAIT)时、我们排除了这些驱动程序、仅  对 应用程序和中间件使用了 POSIX。  

    我相信在某种程度上、我们已经决定 Simplelink 驱动程序的 RTOS (多线程)调整方案也将移植到 POSIX、但我们从未需要更新低级驱动程序。