summaryrefslogtreecommitdiff
path: root/minix/lib/libc/sys/_mcontext.c
blob: 69b2ea0bba038b488be353926e9cef3b8d717b17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * mcontext.c
*/
#include <sys/cdefs.h>
#include <lib.h>
#include <namespace.h>

#include <string.h>
#include <ucontext.h>
#include <unistd.h>

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


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