/* If there are any pending signals, prep the pthread to run it's signal * handler. The next time the pthread is run, it will pop into it's signal * handler context instead of its original saved context. Once the signal * handler is complete, the original context will be restored and restarted. */ static void __pthread_prep_for_pending_posix_signals(pthread_t pthread) { if (!pthread->sigdata && pthread->sigpending) { sigset_t andset = pthread->sigpending & (~pthread->sigmask); if (!__sigisemptyset(&andset)) { __pthread_prep_sighandler(pthread, __run_pending_sighandlers, NULL); } } }
/* Test whether SET is empty. */ int sigisemptyset (const sigset_t *set) { if (set == NULL) { __set_errno (EINVAL); return -1; } return __sigisemptyset (set); }