Sleeping Barber simulator in C