Updating the question with more information:
I have 32 network namespaces on a Linux Ubuntu 14.04 box, and a C program runs in each namespace. I want the program to be able to share some data with it's siblings in other namespaces (not threads, separate processes). How can this be done? I cannot do a UDP multicast as each namespace has it's own networking stack and packets sent to a multicast domain is not visible to other namespaces. I am not able to think of doing this cleanly via mmap memory either.
With mmap(), each process may attempt to write to the map at the same time. Also, when one process writes, others should be able to figure that out, and update their data structure with this new content. They are allowed to write once every process knows about this previous update. This is why I first thought of using UDP Multicast socket to communicate, it works very nicely for 32 processes, but they have to be in the same namespace.
Also, Unix domain socket does not allow multiple reader/writers to work as far as I understand.
Appreciate any help!