#define PM_SIG_SET m2_sigset /* sigset_t */
#define PM_SIG_CTX m2_p1 /* struct sigcontext * */
-/* Field names for the getmcontext(2)/setmcontext(2) calls. */
-#define PM_MCONTEXT_CTX m1_p1 /* mcontext_t * */
-
/*===========================================================================*
* Calls to VFS *
*===========================================================================*/
} mess_lc_pm_itimer;
_ASSERT_MSG_SIZE(mess_lc_pm_itimer);
+typedef struct {
+ vir_bytes ctx; /* mcontext_t * */
+
+ uint8_t padding[52];
+} mess_lc_pm_mcontext;
+_ASSERT_MSG_SIZE(mess_lc_pm_mcontext);
+
typedef struct {
int which;
int who;
mess_lc_pm_getsid m_lc_pm_getsid;
mess_lc_pm_groups m_lc_pm_groups;
mess_lc_pm_itimer m_lc_pm_itimer;
+ mess_lc_pm_mcontext m_lc_pm_mcontext;
mess_lc_pm_priority m_lc_pm_priority;
mess_lc_pm_ptrace m_lc_pm_ptrace;
mess_lc_pm_reboot m_lc_pm_reboot;
int sys_profbuf(void *ctl_ptr, void *mem_ptr);
/* machine context */
-int sys_getmcontext(endpoint_t proc, mcontext_t *mcp);
-int sys_setmcontext(endpoint_t proc, mcontext_t *mcp);
+int sys_getmcontext(endpoint_t proc, vir_bytes mcp);
+int sys_setmcontext(endpoint_t proc, vir_bytes mcp);
/* input */
int tty_input_inject(int type, int code, int val);
message m;
memset(&m, 0, sizeof(m));
- m.PM_MCONTEXT_CTX = (char *) __UNCONST(mcp);
+ m.m_lc_pm_mcontext.ctx = (vir_bytes)mcp;
return(_syscall(PM_PROC_NR, PM_SETMCONTEXT, &m));
}
message m;
memset(&m, 0, sizeof(m));
- m.PM_MCONTEXT_CTX = (char *) mcp;
+ m.m_lc_pm_mcontext.ctx = (vir_bytes)mcp;
return(_syscall(PM_PROC_NR, PM_GETMCONTEXT, &m));
}
int sys_getmcontext(proc, mcp)
endpoint_t proc; /* process retrieving context */
-mcontext_t *mcp; /* where to store context */
+vir_bytes mcp; /* where to store context */
{
/* A process wants to store its context in mcp. */
int sys_setmcontext(proc, mcp)
endpoint_t proc; /* process setting context */
-mcontext_t *mcp; /* where to get context from */
+vir_bytes mcp; /* where to get context from */
{
/* A process wants to restore context stored in ucp. */
*===========================================================================*/
int do_setmcontext()
{
- return sys_setmcontext(who_e, (mcontext_t *) m_in.PM_MCONTEXT_CTX);
+ return sys_setmcontext(who_e, m_in.m_lc_pm_mcontext.ctx);
}
*===========================================================================*/
int do_getmcontext()
{
- return sys_getmcontext(who_e, (mcontext_t *) m_in.PM_MCONTEXT_CTX);
+ return sys_getmcontext(who_e, m_in.m_lc_pm_mcontext.ctx);
}