minix/lib/libc/sys-minix/_mcontext.c

33 lines
503 B
C
Raw Normal View History

/*
* mcontext.c
*/
#include <sys/cdefs.h>
#include <lib.h>
#include <namespace.h>
#include <string.h>
#include <ucontext.h>
#include <unistd.h>
2012-03-25 20:25:53 +02:00
int setmcontext(const mcontext_t *mcp)
{
message m;
memset(&m, 0, sizeof(m));
m.PM_MCONTEXT_CTX = (char *) __UNCONST(mcp);
return(_syscall(PM_PROC_NR, PM_SETMCONTEXT, &m));
}
2012-03-25 20:25:53 +02:00
int getmcontext(mcontext_t *mcp)
{
message m;
memset(&m, 0, sizeof(m));
m.PM_MCONTEXT_CTX = (char *) mcp;
return(_syscall(PM_PROC_NR, PM_GETMCONTEXT, &m));
}