BoundedBuffer24.02.14

During the weekend I worked on semaphores.
These lines are focused more on semaphores than on mutex and others signals.

What the code should do:

create 3 threads which 'write' on a buffer.
create 1 threads which reads from the same buffer.
the 4 threads are controlled by semaphores, so, for instance, a consumer can't start reading if, at least, one producer has started writing something on the buffer.

The pattern is the same used for the basic BoundedBuffer problem(with one producer and one consumer); I'm trying to improve it and adapting it to this situation.

I keep on studying semaphores, mutex, signals and the pthread library in order to improve the code.