pthreads practice with multi threaded libraries in C this is a simple implementation of the reader/writer problem