  /**  * Calls wait() on a Semaphore  *  * When a thread calls this function, the value of the semaphore is decremented.  * If the value goes below 0, the thread is put into a WAIT state. That means  * calling thread is taken out of the runqueue if the value of the semaphore  * goes below 0.  * @param semaphore index of semaphore to be manipulated in the table   *  */ void semaphore_wait(int semaphore)