glibc/sysdeps/unix/sysv/linux/sigsuspend.c
Ulrich Drepper 655b26bb75 Update.
1998-10-29  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de> 
 
	* manual/locale.texi (Formatting Numbers): Fix strfmon examples. 
 
1998-10-28  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de> 
 
	* sysdeps/generic/bits/select.h (__FD_ZERO): Change '\0' to plain 
	0, __fd_mask is usually not a char. 
 
1998-10-30  Andreas Jaeger  <aj@arthur.rhein-neckar.de> 
 
	* sysdeps/unix/sysv/linux/sigpending.c (sigpending): Allow 
	compilation on systems without rt_* syscalls (e.g. on Linux 2.0). 
	* sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Likewise. 
	* sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. 
	* sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. 
	* sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Likewise 
	* sysdeps/unix/sysv/linux/sigqueue.c: Likewise. 
	* sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. 
 
	* sysdeps/unix/sysv/linux/i386/sigaction.c (__sigaction): Allow 
	compiling on systems without rt_sigaction syscall. 
	* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (__sigaction): 
	Likewise. 
 
1998-10-30  Andreas Jaeger  <aj@arthur.rhein-neckar.de> 
 
	* time/strptime.c (HERE_D_FMT): Fix typo.   
	Reported by Claus Heine <heine@math1.rwth-aachen.de>, PR libc/842. 
 
	* catgets/test1.msg: New file.
1998-10-31 11:42:52 +00:00

61 lines
2.0 KiB
C

/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include <sysdep.h>
#include <sys/syscall.h>
extern int __syscall_sigsuspend (int, unsigned long int, unsigned long int);
extern int __syscall_rt_sigsuspend (const sigset_t *, size_t);
/* The variable is shared between all wrappers around signal handling
functions which have RT equivalents. */
int __libc_missing_rt_sigs;
/* Change the set of blocked signals to SET,
wait until a signal arrives, and restore the set of blocked signals. */
int
__sigsuspend (set)
const sigset_t *set;
{
#ifdef __NR_rt_sigsuspend
/* First try the RT signals. */
if (!__libc_missing_rt_sigs)
{
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
int saved_errno = errno;
int result = INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
if (result >= 0 || errno != ENOSYS)
return result;
__set_errno (saved_errno);
__libc_missing_rt_sigs = 1;
}
#endif
return INLINE_SYSCALL (sigsuspend, 3, 0, 0, set->__val[0]);
}
weak_alias (__sigsuspend, sigsuspend)