您好:
bool semaphore_pend (Semaphore_Object * sem、uint32 timeout) ,超时的时间单位是多少?毫秒?
我没有找到相关信息;
谢谢
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.
您好:
bool semaphore_pend (Semaphore_Object * sem、uint32 timeout) ,超时的时间单位是多少?毫秒?
我没有找到相关信息;
谢谢
您好 Yao、
请参阅 SYS/BIOS 文档中的以下内容、信标位于 TI-RTOS 内核运行时 API 和配置(CDOC)->所有模块下:
Semaphore_pend ()
等待信号量
bool semaphore_pend (semaphore_handle、uint32超时);
参数
句柄—之前创建的信标实例对象的句柄
超时—在这么多系统时间单位后返回
返回
如果成功则为 true,如果超时则为 false
详细信息
如果信标计数大于零(可用)、此函数会递减计数并返回 true。 如果信标计数为零(不可用),此函数将暂停当前任务的执行,直到调用 post()或超时到期。
BIOS_WAIT_FOREVER 的超时值会导致任务无限期地等待其信号量被发布。
BIOS_NO_WAIT 的超时值会导致 Semaphore_pend 立即返回。
此外、此 E2E 主题还介绍了系统时间单元: https://e2e.ti.com/support/legacy_forums/embedded/tirtos/f/355/p/193525/691979#691979
明白了!
谢谢 你 Ralph Jacobi