fifo.*: made some small changes to adapt to new semaphore type