我想自己新建一个信号量,
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