vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / signal / sigpending.cpp
blobb923a3258ae88b2f4b29df4ed04dbd08df05f4c4
1 /*
2 * Copyright 2005-2011, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
5 * Author(s):
6 * Jérôme Duval
7 * Ingo Weinhold, ingo_weinhold@gmx.de
8 */
11 #include <signal.h>
13 #include <errno.h>
15 #include <syscall_utils.h>
17 #include <errno_private.h>
18 #include <symbol_versioning.h>
19 #include <syscalls.h>
21 #include <signal_private.h>
24 int
25 __sigpending_beos(sigset_t_beos* beosSet)
27 sigset_t set;
28 if (__sigpending(&set) != 0)
29 return -1;
31 *beosSet = to_beos_sigset(set);
32 return 0;
36 int
37 __sigpending(sigset_t* set)
39 RETURN_AND_SET_ERRNO(_kern_sigpending(set));
43 DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigpending_beos", "sigpending@",
44 "BASE");
46 DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigpending", "sigpending@@",
47 "1_ALPHA4");