A FIFO implementation in C using circular buffer with stored last operation.