xref: /haiku/src/system/libroot/posix/signal/sigpending.cpp (revision c80809a3ab0b0a2ce53ea861a2b00ace24ff452d)
1 /*
2  * Copyright 2005-2011, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT license.
4  *
5  * Author(s):
6  *		Jérôme Duval
7  *		Ingo Weinhold, ingo_weinhold@gmx.de
8  */
9 
10 
11 #include <signal.h>
12 
13 #include <errno.h>
14 
15 #include <syscall_utils.h>
16 
17 #include <symbol_versioning.h>
18 #include <syscalls.h>
19 
20 #include <signal_private.h>
21 
22 
23 int
24 __sigpending_beos(sigset_t_beos* beosSet)
25 {
26 	sigset_t set;
27 	if (__sigpending(&set) != 0)
28 		return -1;
29 
30 	*beosSet = to_beos_sigset(set);
31 	return 0;
32 }
33 
34 
35 int
36 __sigpending(sigset_t* set)
37 {
38 	RETURN_AND_SET_ERRNO(_kern_sigpending(set));
39 }
40 
41 
42 DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigpending_beos", "sigpending@",
43 	"BASE");
44 
45 DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigpending", "sigpending@@",
46 	"1_ALPHA4");
47