UnlockSemaphore() function:
Err UnlockSemaphore( Item s )s argument is the item number of the semaphore for the resource you want to unlock. The function returns 0 if successful or an error code (a negative value) if an error occurred. It returns the NOTOWNER error code if your task did not call LockSemaphore() for the specified semaphore.