sigcompat.c (1574) | sigcompat.c (17141) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33 34#if defined(LIBC_SCCS) && !defined(lint) 35static char sccsid[] = "@(#)sigcompat.c 8.1 (Berkeley) 6/2/93"; 36#endif /* LIBC_SCCS and not lint */ 37 38#include <sys/param.h> 39#include <signal.h> 40 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33 34#if defined(LIBC_SCCS) && !defined(lint) 35static char sccsid[] = "@(#)sigcompat.c 8.1 (Berkeley) 6/2/93"; 36#endif /* LIBC_SCCS and not lint */ 37 38#include <sys/param.h> 39#include <signal.h> 40 |
41int |
|
41sigvec(signo, sv, osv) 42 int signo; 43 struct sigvec *sv, *osv; 44{ 45 int ret; 46 47 if (sv) 48 sv->sv_flags ^= SV_INTERRUPT; /* !SA_INTERRUPT */ 49 ret = sigaction(signo, (struct sigaction *)sv, (struct sigaction *)osv); 50 if (ret == 0 && osv) 51 osv->sv_flags ^= SV_INTERRUPT; /* !SA_INTERRUPT */ 52 return (ret); 53} 54 | 42sigvec(signo, sv, osv) 43 int signo; 44 struct sigvec *sv, *osv; 45{ 46 int ret; 47 48 if (sv) 49 sv->sv_flags ^= SV_INTERRUPT; /* !SA_INTERRUPT */ 50 ret = sigaction(signo, (struct sigaction *)sv, (struct sigaction *)osv); 51 if (ret == 0 && osv) 52 osv->sv_flags ^= SV_INTERRUPT; /* !SA_INTERRUPT */ 53 return (ret); 54} 55 |
56int |
|
55sigsetmask(mask) 56 int mask; 57{ 58 int omask, n; 59 60 n = sigprocmask(SIG_SETMASK, (sigset_t *) &mask, (sigset_t *) &omask); 61 if (n) 62 return (n); 63 return (omask); 64} 65 | 57sigsetmask(mask) 58 int mask; 59{ 60 int omask, n; 61 62 n = sigprocmask(SIG_SETMASK, (sigset_t *) &mask, (sigset_t *) &omask); 63 if (n) 64 return (n); 65 return (omask); 66} 67 |
68int |
|
66sigblock(mask) 67 int mask; 68{ 69 int omask, n; 70 71 n = sigprocmask(SIG_BLOCK, (sigset_t *) &mask, (sigset_t *) &omask); 72 if (n) 73 return (n); 74 return (omask); 75} 76 | 69sigblock(mask) 70 int mask; 71{ 72 int omask, n; 73 74 n = sigprocmask(SIG_BLOCK, (sigset_t *) &mask, (sigset_t *) &omask); 75 if (n) 76 return (n); 77 return (omask); 78} 79 |
80int |
|
77sigpause(mask) 78 int mask; 79{ 80 return (sigsuspend((sigset_t *)&mask)); 81} | 81sigpause(mask) 82 int mask; 83{ 84 return (sigsuspend((sigset_t *)&mask)); 85} |