1d46a010cSIngo Weinhold /*
2d46a010cSIngo Weinhold * Copyright 2008, Vasilis Kaoutsis, kaoutsis@sch.gr
3d46a010cSIngo Weinhold * Distributed under the terms of the MIT License.
4d46a010cSIngo Weinhold */
5d46a010cSIngo Weinhold
6d46a010cSIngo Weinhold
7d46a010cSIngo Weinhold #include <signal.h>
8d46a010cSIngo Weinhold
9*24df6592SIngo Weinhold #include <symbol_versioning.h>
10*24df6592SIngo Weinhold
11*24df6592SIngo Weinhold #include <signal_private.h>
12*24df6592SIngo Weinhold
13d46a010cSIngo Weinhold
14d46a010cSIngo Weinhold int
__sigpause_beos(int signal)15*24df6592SIngo Weinhold __sigpause_beos(int signal)
16*24df6592SIngo Weinhold {
17*24df6592SIngo Weinhold sigset_t_beos processSignalSet;
18*24df6592SIngo Weinhold if (__pthread_sigmask_beos(SIG_SETMASK, NULL, &processSignalSet) == -1)
19*24df6592SIngo Weinhold return -1;
20*24df6592SIngo Weinhold
21*24df6592SIngo Weinhold if (__sigdelset_beos(&processSignalSet, signal) == -1)
22*24df6592SIngo Weinhold return -1;
23*24df6592SIngo Weinhold
24*24df6592SIngo Weinhold return __sigsuspend_beos(&processSignalSet);
25*24df6592SIngo Weinhold }
26*24df6592SIngo Weinhold
27*24df6592SIngo Weinhold
28*24df6592SIngo Weinhold int
__sigpause(int signal)29*24df6592SIngo Weinhold __sigpause(int signal)
30d46a010cSIngo Weinhold {
31d46a010cSIngo Weinhold sigset_t processSignalSet;
32d46a010cSIngo Weinhold if (sigprocmask(SIG_SETMASK, NULL, &processSignalSet) == -1)
33d46a010cSIngo Weinhold return -1;
34d46a010cSIngo Weinhold
35d46a010cSIngo Weinhold if (sigdelset(&processSignalSet, signal) == -1)
36d46a010cSIngo Weinhold return -1;
37d46a010cSIngo Weinhold
38d46a010cSIngo Weinhold return sigsuspend(&processSignalSet);
39d46a010cSIngo Weinhold }
40*24df6592SIngo Weinhold
41*24df6592SIngo Weinhold
42*24df6592SIngo Weinhold DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigpause_beos", "sigpause@", "BASE");
43*24df6592SIngo Weinhold
44*24df6592SIngo Weinhold DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigpause", "sigpause@@", "1_ALPHA4");
45