I have two processes:
Producer
and
Consumer
they have a commonly mmaped shared region of memory
Memory
Now, Producer writes stuff to Memory. Consumer reads stuff from Memory.
I would prefer Consumer not to spin wait with Memory is empty.
I would prefer Producer not to spin wait when Memory is full.
How do I achieve this?