I am trying to implement the producer consumer problem by creating my own semaphores. When compiling and running the program I am getting the error :

Exception in thread "Producer"...