On 04/03/21(Thu) 12:25, Claudio Jeker wrote:
> On Thu, Mar 04, 2021 at 11:06:21AM +0100, Martin Pieuchot wrote:
> > [...]
> > The comment documents what sibling threads are supposed to do once the
> > current one has called single_thread_set() with a given SINGLE_* option.
> > 
> > Sibling threads will continue to execute until the next parking point
> > where single_thread_check() are.  Parking points are divided in two
> > categories.  In the "deep" ones unwinding is preferred for UNWIND and
> > EXIT, in the others only context switching occurs. 
> > 
> > Every single_thread_set() call is in itself a parking point to prevent
> > races.  The only "deep" parking point is the one in sys_execve() for
> > obvious reasons.
> 
> Actually this is where I got confused. This is the place where "deep" is
> the wrong word. The fact that SINGLE_UNWIND will abort the
> single_thread_set() if another thread is in the process to run single
> threaded should probably be added as a comment here. In the end this is
> here to prevent a race between two threads calling execve() at the same
> time.

I'd appreciate if you could add the comment yourself if you're ok with
the diff as is.  I'm not sure to understand what you're suggesting, so
it seems simpler to me if you can pick the words yourself.

Reply via email to