微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > 关于信号量

关于信号量

时间:10-02 整理:3721RD 点击:

我想自己新建一个信号量,

sem = Semaphore_create(0, NULL, NULL);创建信号量

Semaphore_post(sem);发布信号量

Semaphore_pend(sem, timeout);等待信号量,这个等待信号量的第二参数怎么设置,什么值代表超时等待,什么代表一直阻塞。。。

Semaphore_pend() is used to wait for a semaphore. It is a blocking call which will allow another task to
run. The timeout parameter allows the task to wait until a timeout, wait indefinitely, or not wait at all.
The return value is used to indicate if the semaphore was signaled successfully

http://processors.wiki.ti.com/images/4/4f/Semaphores.pdf

http://www.ti.com/lit/ug/spruex3o/spruex3o.pdf

http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/sysbios/6_21_00_13/exports/docs/docs/cdoc/ti/sysbios/ipc/Semaphore.html

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top