Semaphore options include the following:
SEM_Q_PRIORITY (0x1)
Queue pended tasks on the basis of their priority.
SEM_Q_FIFO (0x0)
Queue pended tasks on a first-in-first-out basis.
SEM_DELETE_SAFE (0x4)
Protect a task that owns the semaphore from unexpected deletion. This option enables an implicit taskSafe() for each semTake(), and an implicit taskUnsafe() for each semGive().
SEM_INVERSION_SAFE (0x8)
Protect the system from priority inversion. With this option, the task owning the semaphore will execute at the highest priority of the tasks pended on the semaphore, if it is higher than its current priority.
This option must be accompanied by the SEM_Q_PRIORITY queuing mode.
SEM_EVENTSEND_ERR_NOTIFY (0x10)
When the semaphore is given, if a task is registered for events and the actual sending of events fails, a value of ERROR is returned and the errno is set accordingly. This option is off by default.
SEM_INTERRUPTIBLE (0x20)
Signal sent to an RTP task blocked on a semaphore created with this option, would make the task ready and return with ERROR and errno set to EINTR. This option has no affect for a kernel task blocked on the same semaphore created with this option. This option is off by default.