Purpose:
目的:
I want to synchronize three different processes, so I thought of using shared memory between the processes. So I have forked two child's from one process and created a shared memory segment before creating the child's. My intention is to run the child processes and parent process in different cores to make it parallel execution. So I have used the affinity control to assign the according CPU. Both the child's will wait in indefinite while loop (consuming on the same CPU which is assigned) until it gets the trigger from the parent via shared memory. So when the parent writes some specific character/string, the child should come out loop and start executing the rest of the code.I want to synchronize three di