minix/lib/libc/other/_mcontext.c
Thomas Veerman bef0e3eb63 - Add support for the ucontext system calls (getcontext, setcontext,
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.
2010-03-12 15:58:41 +00:00

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));
}