home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / gcc / ixemulsrc.lha / ixemul / general / sigsetops.c < prev    next >
C/C++ Source or Header  |  1996-12-11  |  2KB  |  68 lines

  1. /*-
  2.  * Copyright (c) 1989 The Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted provided
  6.  * that: (1) source distributions retain this entire copyright notice and
  7.  * comment, and (2) distributions including binaries display the following
  8.  * acknowledgement:  ``This product includes software developed by the
  9.  * University of California, Berkeley and its contributors'' in the
  10.  * documentation or other materials provided with the distribution and in
  11.  * all advertising materials mentioning features or use of this software.
  12.  * Neither the name of the University nor the names of its contributors may
  13.  * be used to endorse or promote products derived from this software without
  14.  * specific prior written permission.
  15.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  16.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  17.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  18.  *
  19.  *    @(#)sigset.c    5.2 (Berkeley) 7/1/90
  20.  */
  21.  
  22. #if defined(LIBC_SCCS) && !defined(lint)
  23. static char sccsid[] = "@(#)sigset.c    5.2 (Berkeley) 7/1/90";
  24. #endif /* LIBC_SCCS and not lint */
  25.  
  26. #define _KERNEL
  27. #include "ixemul.h"
  28.  
  29. #undef sigemptyset
  30. #undef sigfillset
  31. #undef sigaddset
  32. #undef sigdelset
  33. #undef sigismember
  34.  
  35. int
  36. sigemptyset(sigset_t *set)
  37. {
  38.     *set = 0;
  39.     return (0);
  40. }
  41.  
  42. int
  43. sigfillset(sigset_t *set)
  44. {
  45.     *set = ~(sigset_t)0;
  46.     return (0);
  47. }
  48.  
  49. int
  50. sigaddset(sigset_t *set, int signo)
  51. {
  52.     *set |= sigmask(signo);
  53.     return (0);
  54. }
  55.  
  56. int
  57. sigdelset(sigset_t *set, int signo)
  58. {
  59.     *set &= ~sigmask(signo);
  60.     return (0);
  61. }
  62.  
  63. int
  64. sigismember(const sigset_t *set, int signo)
  65. {
  66.     return ((*set & ~sigmask(signo)) != 0);
  67. }
  68.