/* * Backwards compatible pause. */ int __pause() { sigset_t oset; if (_sigprocmask(SIG_BLOCK, NULL, &oset) == -1) return (-1); return (_sigsuspend(&oset)); }
int __sigsuspend(const sigset_t * set) { int ret; _thread_enter_cancellation_point(); ret = _sigsuspend(set); _thread_leave_cancellation_point(); return ret; }
int __sigsuspend(const sigset_t * set) { struct pthread *curthread = _get_curthread(); int ret; _thr_cancel_enter(curthread); ret = _sigsuspend(set); _thr_cancel_leave(curthread, 1); return (ret); }