TI中文支持网
TI专业的中文技术问题搜集分享网站

关于信号量

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

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

cedar_xuesong:

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

赞(0)
未经允许不得转载:TI中文支持网 » 关于信号量
分享到: 更多 (0)