Rename code solution using semaphores to solution code in C using semaphores