add of the semaphore.c file for homework 4 of ece536 spring 2013 course.