home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / gnuc / gen_library / rcs / sigsetops.c,v < prev    next >
Encoding:
Text File  |  1992-07-04  |  1.9 KB  |  93 lines

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