Eric I'm familiar with SMP, thanks :)1.
flags are neither atomic nor protected with any lock.
flags are atomic as they are a machine word. So they do not
require a read/modify write so they will either be written
or not written. Plus this allows write-sharing of the appropriate
cache line which is very polite (assuming the line is not shared with
something else)
memory barrier doesn't help. you really need to think about.2. due to 1) you code is buggy. in this respect do_exit() is not serialized withYes. I may need a memory barrier in there. I need to think
copy_process().
about that a little more.
And what about references to pspace->child_reaper which was freed already?3. due to the same 1) reason
> + kill_pspace_info(SIGKILL, (void *)1, tsk->pspace);
can miss a task being forked. Bang!!!
Well the only bad thing that can happen is that I get a process that
can run and observe pid == 1 has exited. So Bang!! is not too
painful.