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

33 lines
506 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.m_lc_pm_mcontext.ctx = (vir_bytes)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.m_lc_pm_mcontext.ctx = (vir_bytes)mcp;
return(_syscall(PM_PROC_NR, PM_GETMCONTEXT, &m));
}