失敗,我在我的工作中使用Vxworks5.5 m_SemServState = semBCreate(SEM_Q_FIFO, SEM_FULL);
//.... In another function I have following code.
SemStatus = semTake(m_SemServState, 500);
if(OK == SemStatus)
我已經在vxWorks平臺上運行一個示例C++程序來測試互斥量和二進制信號量之間的時間差異。下面的程序是原型 SEM ID semMutex;
UINT ITER = 10000;
taskIdOne = TASKSPAWN("t1",TASK_PRIORITY_2,0,8192,0,(FUNCPTR)myMutexMethod,0,0);
taskIdTwo = TASKSPAWN("t2