VM: simplify slab allocator
[minix.git] / lib / libsys / sys_mcontext.c
blob6b4b69533e798c127caba92e2d58a8133c4b3256
1 #include "syslib.h"
3 int sys_getmcontext(proc, mcp)
4 endpoint_t proc; /* process retrieving context */
5 mcontext_t *mcp; /* where to store context */
7 /* A process wants to store its context in mcp. */
9 message m;
10 int r;
12 m.PR_ENDPT = proc;
13 m.PR_CTX_PTR = (char *) 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 mcontext_t *mcp; /* where to get context from */
22 /* A process wants to restore context stored in ucp. */
24 message m;
25 int r;
27 m.PR_ENDPT = proc;
28 m.PR_CTX_PTR = (char *) mcp;
29 r = _kernel_call(SYS_SETMCONTEXT, &m);
30 return r;