Synopsis:
sem_clear(sem_id)
Arguments:
sem_id - The semaphore ID.
Description: This function clears a semaphore that was previous set by the calling task. If an attempt is made to slear a semephore that was not previously set by the calling task then a error message is generated and the function will return -3.
Returns: 0 if the semaphore was successfully cleared by the calling task, -1 if an invalid semaphore ID is specified, -3 if the semaphore was not set by the calling task.