vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / signal / sigsuspend.cpp
blob21fc684305996f13a1a80b2a9d0fadf8f794f209
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>
14 #include <pthread.h>
16 #include <syscall_utils.h>
18 #include <symbol_versioning.h>
19 #include <syscalls.h>
21 #include <errno_private.h>
22 #include <signal_private.h>
25 int
26 __sigsuspend_beos(const sigset_t_beos* beosMask)
28 sigset_t mask = from_beos_sigset(*beosMask);
29 return __sigsuspend(&mask);
33 int
34 __sigsuspend(const sigset_t* mask)
36 __set_errno(_kern_sigsuspend(mask));
38 pthread_testcancel();
40 return -1;
44 DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigsuspend_beos", "sigsuspend@",
45 "BASE");
47 DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigsuspend", "sigsuspend@@",
48 "1_ALPHA4");