summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/sigsuspend.c
blob: 57a1a44a758983515303a46222c70905a3d35b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* vi: set sw=4 ts=4: */
/*
 * sigsuspend() for uClibc
 *
 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
 *
 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 */

#include <sys/syscall.h>

#ifdef __USE_POSIX
#include <signal.h>
#include <cancel.h>

int __NC(sigsuspend)(const sigset_t *set)
{
#ifdef __NR_rt_sigsuspend
	return INLINE_SYSCALL(rt_sigsuspend, 2, set, __SYSCALL_SIGSET_T_SIZE);
#else
	return INLINE_SYSCALL(sigsuspend, 3, 0, 0, set->__val[0]);
#endif
}
CANCELLABLE_SYSCALL(int, sigsuspend, (const sigset_t *set), (set))
lt_libc_hidden(sigsuspend)
#endif