1 /* vi: set sw=4 ts=4: */
5 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 #include <sys/syscall.h>
15 /* even if it is not obvious, glibc uses the pause syscall, see syscalls.list */
16 # define __NR___pause_nocancel __NR_pause
17 static _syscall0(int, __NC(pause))
18 CANCELLABLE_SYSCALL(int, pause, (void), ())
25 # ifdef __LINUXTHREADS_OLD__
32 /*__sigemptyset (&set); - why? */
33 sigprocmask (SIG_BLOCK, NULL, &set);
35 /* pause is a cancellation point, but so is sigsuspend.
36 So no need for anything special here. */
37 return sigsuspend(&set);
39 CANCELLABLE_SYSCALL(int, pause, (void), ())
40 LIBC_CANCEL_HANDLED (); /* sigsuspend handles our cancellation. */