Create c code for baker's algorithm

this code implements semaphores, busy waiting and critical section