-1 if an error occurred
0 if no error occurred
Parameters
SEMAPHORE id is the unique identification number of the semaphore.