diff options
| author | John Birrell <jb@FreeBSD.org> | 1999-06-20 08:28:48 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1999-06-20 08:28:48 +0000 |
| commit | 02292f131acd0fc6c16b950f1e6b05e75de2cdcb (patch) | |
| tree | 0ff88e4b640389e399994c81f9addd13093029cb /lib/libpthread/thread/thr_suspend_np.c | |
| parent | c2077034654a87e5a0517430c4d0c7d10721e484 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_suspend_np.c')
| -rw-r--r-- | lib/libpthread/thread/thr_suspend_np.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libpthread/thread/thr_suspend_np.c b/lib/libpthread/thread/thr_suspend_np.c index 6a6eaf4304de..02943bb2041c 100644 --- a/lib/libpthread/thread/thr_suspend_np.c +++ b/lib/libpthread/thread/thr_suspend_np.c @@ -29,6 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ */ #include <errno.h> #ifdef _THREAD_SAFE @@ -52,20 +53,19 @@ pthread_suspend_np(pthread_t thread) } /* - * Guard against preemption by a scheduling signal. - * A change of thread state modifies the waiting - * and priority queues. + * Defer signals to protect the scheduling queues from + * access by the signal handler: */ - _thread_kern_sched_defer(); + _thread_kern_sig_defer(); /* Suspend the thread. */ PTHREAD_NEW_STATE(thread,PS_SUSPENDED); /* - * Reenable preemption and yield if a scheduling signal - * occurred while in the critical region. + * Undefer and handle pending signals, yielding if + * necessary: */ - _thread_kern_sched_undefer(); + _thread_kern_sig_undefer(); } return(ret); } |
