"The only way this will happen is if the value of the semaphore is not greater than 0; hence, 0 is the initial value."
I think it's better this way
The only way this will happen is if the value of the semaphore is less than 0; however since sem_wait() will first decrement the value before checking it, hence, 0 is the initial value."
just a suggestion for the following sentence.
"The only way this will happen is if the value of the semaphore is not greater than 0; hence, 0 is the initial value."
I think it's better this way
The only way this will happen is if the value of the semaphore is less than 0; however since sem_wait() will first decrement the value before checking it, hence, 0 is the initial value."