For a school assignment, I\'m trying to implement a producer/consumer simulation in C, with multithreading. While the program seems to work in a single thread implementation