This method creates an RiCOSSemaphore object.
SignatureRiCOSSemaphore *RiCOSSemaphore_create(
unsigned long semFlags, unsigned long initialCount,
unsigned long maxCount, const char *const name);
ParameterssemFlags
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
The unique name of the semaphore
ReturnsThe newly created RiCOSSemaphore object
ExampleRiCOSSemaphore * RiCOSSemaphore_create(
unsigned long semFlags, unsigned long initialCount,
unsigned long maxCount, const char * const name)
{
RiCOSSemaphore * me = malloc(sizeof(RiCOSSemaphore));
RiCOSSemaphore_init(me, semFlags, initialCount,
maxCount, name);
return me;
}