2011-02-17 18:11:09 +01:00
|
|
|
#include <sys/cdefs.h>
|
2013-10-22 17:08:15 +02:00
|
|
|
#include <sys/signal.h>
|
|
|
|
#include <sys/sigtypes.h>
|
2011-02-17 18:11:09 +01:00
|
|
|
#include <lib.h>
|
2013-10-22 17:08:15 +02:00
|
|
|
#include <string.h>
|
2011-02-17 18:11:09 +01:00
|
|
|
#include "namespace.h"
|
|
|
|
|
2013-11-04 22:48:08 +01:00
|
|
|
#include <string.h>
|
2011-02-17 18:11:09 +01:00
|
|
|
#include <signal.h>
|
|
|
|
|
|
|
|
int sigprocmask(how, set, oset)
|
|
|
|
int how;
|
|
|
|
const sigset_t *set;
|
|
|
|
sigset_t *oset;
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
2013-11-04 22:48:08 +01:00
|
|
|
memset(&m, 0, sizeof(m));
|
2011-02-17 18:11:09 +01:00
|
|
|
if (set == (sigset_t *) NULL) {
|
2013-11-04 22:48:08 +01:00
|
|
|
m.PM_SIG_HOW = SIG_INQUIRE;
|
2013-10-22 17:08:15 +02:00
|
|
|
sigemptyset(&m.PM_SIG_SET);
|
2011-02-17 18:11:09 +01:00
|
|
|
} else {
|
2013-11-04 22:48:08 +01:00
|
|
|
m.PM_SIG_HOW = how;
|
2013-10-22 17:08:15 +02:00
|
|
|
m.PM_SIG_SET = *set;
|
2011-02-17 18:11:09 +01:00
|
|
|
}
|
2013-11-04 22:48:08 +01:00
|
|
|
if (_syscall(PM_PROC_NR, PM_SIGPROCMASK, &m) < 0) return(-1);
|
2013-10-22 17:08:15 +02:00
|
|
|
if (oset != (sigset_t *) NULL) *oset = m.PM_SIG_SET;
|
|
|
|
|
2011-02-17 18:11:09 +01:00
|
|
|
return(m.m_type);
|
|
|
|
}
|
2013-01-07 20:10:08 +01:00
|
|
|
|
2013-01-18 00:06:11 +01:00
|
|
|
#if defined(__minix) && defined(__weak_alias)
|
2013-01-07 20:10:08 +01:00
|
|
|
__weak_alias(sigprocmask, __sigprocmask14)
|
|
|
|
#endif
|