- 7
- 0
- 约1.04万字
- 约 71页
- 2016-11-23 发布于湖北
- 举报
VxWorks进程同步 互斥 /* create a binary semaphore that is initially full */ semMutex = semBCreate (SEM_Q_PRIORITY, SEM_FULL);? semTake (semMutex, WAIT_FOREVER); ... /* critical region, accessible only by one task at a time */ semGive (semMutex); VxWorks进程同步 同步 init () { intConnect (..., eventInterruptSvcRout, ...); semSync = semBCreate (SEM_Q_FIFO, SEM_EMPTY); taskSpawn (..., task1); }? ? VxWorks进程同步 同步(cont.) ? task1 () { ... semTake (semSync, WAIT_FOREVER); /* wait for event*/
原创力文档

文档评论(0)