adding skeleton code for pthreads synchronization