15 SEM_ID semCreateNamed(
int initialCount,
char *name);
19 SEM_ID semAttachNamed(
char *name);
22 SEM_ID semCCreate(
int options,
int initialCount);
25 inline STATUS semGive(SEM_ID semId)
27 return sem_post(semId);
42 inline STATUS semTake(SEM_ID semId,
int timeout=WAIT_FOREVER)
44 if(timeout == NO_WAIT)
return sem_trywait(semId);
46 while(sem_wait(semId) == -1)
48 if(errno != EINTR)
return -1;
49 if(timeout != WAIT_FOREVER)
return -1;
55 STATUS semDelete(SEM_ID semId);