RiCBoolean RiCOSSemaphore_init ( RiCOSSemaphore *const me, unsigned long semFlags, unsigned long initialCount, unsigned long maxCount, const char *const name);
me
The RiCOSSemaphore object to initialize
semFlags
The adapter-specific creation flags
initialCount
The initial number of tokens available in the semaphore
maxCount
The maximum number of tokens available in the semaphore
name
RiCBoolean RiCOSSemaphore_init(RiCOSSemaphore * const me,
unsigned long semFlags, unsigned long initialCount,
unsigned long maxCount, const char * const name)
{
if (me == NULL) return RiCFALSE;
me->m_semId = NULL;
me->m_semId = semCCreate((int)semFlags,
(int)initialCount);
return (me->m_semId != NULL);
}