Problem of dining philosophers in C with monitors