OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [libiberty/] [sigsetmask.c] - Blame information for rev 303

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 khays
/* Version of sigsetmask.c
2
   Written by Steve Chamberlain (sac@cygnus.com).
3
   Contributed by Cygnus Support.
4
   This file is in the public doamin. */
5
 
6
/*
7
 
8
@deftypefn Supplemental int sigsetmask (int @var{set})
9
 
10
Sets the signal mask to the one provided in @var{set} and returns
11
the old mask (which, for libiberty's implementation, will always
12
be the value @code{1}).
13
 
14
@end deftypefn
15
 
16
*/
17
 
18
#define _POSIX_SOURCE
19
#include <ansidecl.h>
20
/* Including <sys/types.h> seems to be needed by ISC. */
21
#include <sys/types.h>
22
#include <signal.h>
23
 
24
extern void abort (void) ATTRIBUTE_NORETURN;
25
 
26
#ifdef SIG_SETMASK
27
int
28
sigsetmask (int set)
29
{
30
    sigset_t new_sig;
31
    sigset_t old_sig;
32
 
33
    sigemptyset (&new_sig);
34
    if (set != 0) {
35
      abort();  /* FIXME, we don't know how to translate old mask to new */
36
    }
37
    sigprocmask(SIG_SETMASK, &new_sig, &old_sig);
38
    return 1;   /* FIXME, we always return 1 as old value.  */
39
}
40
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.