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.

[参考译文] TM4C123GH6PZ:bool semaphore_pend (Semaphore_Object * sem、uint32 timeout),超时的时间单位?毫秒?

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/903603/tm4c123gh6pz-bool-semaphore_pend-semaphore_object-sem-uint32-timeout-what-is-the-time-unit-of-timeout-milliscond

器件型号:TM4C123GH6PZ

您好:

  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