Initializes semaphore s with a count of cnt. Semaphores
in the kernel are normally allocated statically (i.e., Semaphore
x) and must be initialized (semInit(&x, 1)) before they are
used. void semInit (Semaphore * s, int cnt)
Increments the use count for the semaphore. The current thread will
either acquire the semaphore s or give up control until a semSignal is done by another thread and the scheduler runs.
void semWait (Semaphore * s) semWait
semSignal