added binary semaphores to fifo struct and got rid of global semaphore for fifos