bef0e3eb63
swapcontext, and makecontext). - Fix VM to not erroneously think the stack segment and data segment have collided when a user-space thread invokes brk(). - Add test51 to test ucontext functionality. - Add man pages for ucontext system calls.
26 lines
342 B
C
26 lines
342 B
C
/*
|
|
* mcontext.c
|
|
*/
|
|
#include <lib.h>
|
|
#include <ucontext.h>
|
|
#include <unistd.h>
|
|
|
|
PUBLIC int setmcontext(const mcontext_t *mcp)
|
|
{
|
|
message m;
|
|
|
|
m.m1_p1 = (char *) mcp;
|
|
|
|
return(_syscall(MM, SETMCONTEXT, &m));
|
|
}
|
|
|
|
|
|
PUBLIC int getmcontext(mcontext_t *mcp)
|
|
{
|
|
message m;
|
|
|
|
m.m1_p1 = (char *) mcp;
|
|
|
|
return(_syscall(MM, GETMCONTEXT, &m));
|
|
}
|
|
|