1 /* 2 * mcontext.c 3 */ 4 #include <sys/cdefs.h> 5 #include <lib.h> 6 #include <namespace.h> 7 8 #include <string.h> 9 #include <ucontext.h> 10 #include <unistd.h> 11 setmcontext(const mcontext_t * mcp)12int setmcontext(const mcontext_t *mcp) 13 { 14 message m; 15 16 memset(&m, 0, sizeof(m)); 17 m.m_lc_pm_mcontext.ctx = (vir_bytes)mcp; 18 19 return(_syscall(PM_PROC_NR, PM_SETMCONTEXT, &m)); 20 } 21 22 getmcontext(mcontext_t * mcp)23int getmcontext(mcontext_t *mcp) 24 { 25 message m; 26 27 memset(&m, 0, sizeof(m)); 28 m.m_lc_pm_mcontext.ctx = (vir_bytes)mcp; 29 30 return(_syscall(PM_PROC_NR, PM_GETMCONTEXT, &m)); 31 } 32 33