2011-02-17 18:11:09 +01:00
|
|
|
/*
|
|
|
|
* mcontext.c
|
|
|
|
*/
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <lib.h>
|
|
|
|
#include <namespace.h>
|
|
|
|
|
|
|
|
#include <ucontext.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2012-03-25 20:25:53 +02:00
|
|
|
int setmcontext(const mcontext_t *mcp)
|
2011-02-17 18:11:09 +01:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
2011-11-28 11:07:55 +01:00
|
|
|
m.m1_p1 = (char *) __UNCONST(mcp);
|
2011-02-17 18:11:09 +01:00
|
|
|
|
|
|
|
return(_syscall(PM_PROC_NR, SETMCONTEXT, &m));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-03-25 20:25:53 +02:00
|
|
|
int getmcontext(mcontext_t *mcp)
|
2011-02-17 18:11:09 +01:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
|
|
|
m.m1_p1 = (char *) mcp;
|
|
|
|
|
|
|
|
return(_syscall(PM_PROC_NR, GETMCONTEXT, &m));
|
|
|
|
}
|
|
|
|
|