My own message queue/fifo

view story

http://stackoverflow.com – Can someone guide me on how to implement my own FIFO application to use is in IPC, I know that I can do this with SHM, socket or using any other sys-v or posix ipc. The reason I'm looking for this is because I wanna build this fifo with my own specification that will suite my applications with the locking inside this application, so that any application can only call enqueue or dequeue, just like with fifo the kernel will make sure that it's atomic as long as you are writing less than the pipe_buff. I know how to build circular buffer queue but I'm not sure how will I call it from another ap (HowTos)