#define PM_SIG_OACT m1_p2 /* struct sigaction * */
#define PM_SIG_RET m1_p3 /* int (*)(void) */
-/* Field names for the remaining sigpending(2), sigprocmask(2), sigreturn(2),
- * sigsuspend(2) calls.
- */
-#define PM_SIG_HOW m2_i1 /* int */
-#define PM_SIG_SET m2_sigset /* sigset_t */
-#define PM_SIG_CTX m2_p1 /* struct sigcontext * */
-
/*===========================================================================*
* Calls to VFS *
*===========================================================================*/
} mess_lc_pm_sysuname;
_ASSERT_MSG_SIZE(mess_lc_pm_sysuname);
+typedef struct {
+ int how;
+ vir_bytes ctx;
+ sigset_t set;
+
+ uint8_t padding[32];
+} mess_lc_pm_sigset;
+_ASSERT_MSG_SIZE(mess_lc_pm_sigset);
+
+typedef struct {
+ sigset_t set;
+
+ uint8_t padding[40];
+} mess_pm_lc_sigset;
+_ASSERT_MSG_SIZE(mess_pm_lc_sigset);
+
typedef struct {
time_t sec;
mess_lc_pm_reboot m_lc_pm_reboot;
mess_lc_pm_setgid m_lc_pm_setgid;
mess_lc_pm_setuid m_lc_pm_setuid;
+ mess_lc_pm_sigset m_lc_pm_sigset;
mess_lc_pm_sysuname m_lc_pm_sysuname;
mess_lc_pm_time m_lc_pm_time;
mess_lc_pm_waitpid m_lc_pm_waitpid;
mess_pm_lc_getpid m_pm_lc_getpid;
mess_pm_lc_getuid m_pm_lc_getuid;
mess_pm_lc_ptrace m_pm_lc_ptrace;
+ mess_pm_lc_sigset m_pm_lc_sigset;
mess_pm_lc_time m_pm_lc_time;
mess_pm_lc_waitpid m_pm_lc_waitpid;
memset(&m, 0, sizeof(m));
if (_syscall(PM_PROC_NR, PM_SIGPENDING, &m) < 0) return(-1);
- *set = m.PM_SIG_SET;
+ *set = m.m_pm_lc_sigset.set;
return(m.m_type);
}
memset(&m, 0, sizeof(m));
if (set == (sigset_t *) NULL) {
- m.PM_SIG_HOW = SIG_INQUIRE;
- sigemptyset(&m.PM_SIG_SET);
+ m.m_lc_pm_sigset.how = SIG_INQUIRE;
+ sigemptyset(&m.m_lc_pm_sigset.set);
} else {
- m.PM_SIG_HOW = how;
- m.PM_SIG_SET = *set;
+ m.m_lc_pm_sigset.how = how;
+ m.m_lc_pm_sigset.set = *set;
}
if (_syscall(PM_PROC_NR, PM_SIGPROCMASK, &m) < 0) return(-1);
- if (oset != (sigset_t *) NULL) *oset = m.PM_SIG_SET;
+ if (oset != NULL) *oset = m.m_pm_lc_sigset.set;
return(m.m_type);
}
/* Protect against race conditions by blocking all interrupts. */
sigfillset(&set); /* splhi */
- sigprocmask(SIG_SETMASK, &set, (sigset_t *) NULL);
+ sigprocmask(SIG_SETMASK, &set, NULL);
memset(&m, 0, sizeof(m));
- m.PM_SIG_SET = scp->sc_mask;
- m.PM_SIG_CTX = (char *) scp;
+ m.m_lc_pm_sigset.set = scp->sc_mask;
+ m.m_lc_pm_sigset.ctx = (vir_bytes)scp;
return(_syscall(PM_PROC_NR, PM_SIGRETURN, &m)); /* normally doesn't return */
}
message m;
memset(&m, 0, sizeof(m));
- m.PM_SIG_SET = *set;
+ m.m_lc_pm_sigset.set = *set;
return(_syscall(PM_PROC_NR, PM_SIGSUSPEND, &m));
}
{
assert(!(mp->mp_flags & (PROC_STOPPED | VFS_CALL | UNPAUSED)));
- mp->mp_reply.PM_SIG_SET = mp->mp_sigpending;
+ mp->mp_reply.m_pm_lc_sigset.set = mp->mp_sigpending;
return OK;
}
assert(!(mp->mp_flags & (PROC_STOPPED | VFS_CALL | UNPAUSED)));
- set = m_in.PM_SIG_SET;
- mp->mp_reply.PM_SIG_SET = mp->mp_sigmask;
+ set = m_in.m_lc_pm_sigset.set;
+ mp->mp_reply.m_pm_lc_sigset.set = mp->mp_sigmask;
- switch (m_in.PM_SIG_HOW) {
+ switch (m_in.m_lc_pm_sigset.how) {
case SIG_BLOCK:
sigdelset(&set, SIGKILL);
sigdelset(&set, SIGSTOP);
assert(!(mp->mp_flags & (PROC_STOPPED | VFS_CALL | UNPAUSED)));
mp->mp_sigmask2 = mp->mp_sigmask; /* save the old mask */
- mp->mp_sigmask = m_in.PM_SIG_SET;
+ mp->mp_sigmask = m_in.m_lc_pm_sigset.set;
sigdelset(&mp->mp_sigmask, SIGKILL);
sigdelset(&mp->mp_sigmask, SIGSTOP);
mp->mp_flags |= SIGSUSPENDED;
assert(!(mp->mp_flags & (PROC_STOPPED | VFS_CALL | UNPAUSED)));
- mp->mp_sigmask = m_in.PM_SIG_SET;
+ mp->mp_sigmask = m_in.m_lc_pm_sigset.set;
sigdelset(&mp->mp_sigmask, SIGKILL);
sigdelset(&mp->mp_sigmask, SIGSTOP);
- r = sys_sigreturn(who_e, (struct sigmsg *) m_in.PM_SIG_CTX);
+ r = sys_sigreturn(who_e, (struct sigmsg *)m_in.m_lc_pm_sigset.ctx);
check_pending(mp);
return(r);
}