custom message type for VM_INFO
[minix3.git] / lib / libsys / sys_mcontext.c
blob087555fa9a4a31b78ba8a8b86ea8a9b0dcb73350
1 #include "syslib.h"
3 int sys_getmcontext(proc, mcp)
4 endpoint_t proc; /* process retrieving context */
5 vir_bytes mcp; /* where to store context */
7 /* A process wants to store its context in mcp. */
9 message m;
10 int r;
12 m.m_lsys_krn_sys_getmcontext.endpt = proc;
13 m.m_lsys_krn_sys_getmcontext.ctx_ptr = mcp;
14 r = _kernel_call(SYS_GETMCONTEXT, &m);
15 return r;
18 int sys_setmcontext(proc, mcp)
19 endpoint_t proc; /* process setting context */
20 vir_bytes mcp; /* where to get context from */
22 /* A process wants to restore context stored in ucp. */
24 message m;
25 int r;
27 m.m_lsys_krn_sys_setmcontext.endpt = proc;
28 m.m_lsys_krn_sys_setmcontext.ctx_ptr = mcp;
29 r = _kernel_call(SYS_SETMCONTEXT, &m);
30 return r;