]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/aio_sigqueue.c
1 /* Copyright (C) 1997,1998,1999,2000,2003,2005
2 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
26 #include <sys/syscall.h>
30 #ifdef __NR_rt_sigqueueinfo
32 /* Return any pending signal or wait for one for the given time. */
34 __aio_sigqueue (sig
, val
, caller_pid
)
36 const union sigval val
;
41 /* First, clear the siginfo_t structure, so that we don't pass our
42 stack content to other tasks. */
43 memset (&info
, 0, sizeof (siginfo_t
));
44 /* We must pass the information about the data in a siginfo_t value. */
46 info
.si_code
= SI_ASYNCIO
;
47 info
.si_pid
= caller_pid
;
48 info
.si_uid
= getuid ();
51 return INLINE_SYSCALL (rt_sigqueueinfo
, 3, info
.si_pid
,
52 sig
, __ptrvalue (&info
));
55 # include <rt/aio_sigqueue.c>