A generic userspace FIFO implementation derived from linux kernel kfifo