• Andrew Morton's avatar
    [PATCH] add notify_count for de_thread · 73accc3d
    Andrew Morton authored
    From: Manfred Spraul <manfred@colorfullife.com>
    
    de_thread is called by exec to kill all threads in the thread group except
    the threads required for exec.
    
    The waiting is implemented by waiting for a wakeup from __exit_signal: If
    the reference count is less or equal to 2, then the waiter is woken up.  If
    exec is called by a non-leader thread, then two threads are required for
    exec.
    
    But if a thread group leader calls exec, then only one thread is required
    for exec.  Thus the hardcoded "2" leads to a superfluous wakeup.  The patch
    fixes that by adding a "notify_count" field to the signal structure.
    73accc3d
signal.c 57 KB