xref: /minix3/minix/lib/libsys/vm_exit.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc 
2*433d6423SLionel Sambuc #include "syslib.h"
3*433d6423SLionel Sambuc #include <string.h>
4*433d6423SLionel Sambuc #include <minix/vm.h>
5*433d6423SLionel Sambuc 
6*433d6423SLionel Sambuc /*===========================================================================*
7*433d6423SLionel Sambuc  *                                vm_exit				     *
8*433d6423SLionel Sambuc  *===========================================================================*/
vm_exit(endpoint_t ep)9*433d6423SLionel Sambuc int vm_exit(endpoint_t ep)
10*433d6423SLionel Sambuc {
11*433d6423SLionel Sambuc     message m;
12*433d6423SLionel Sambuc     int result;
13*433d6423SLionel Sambuc 
14*433d6423SLionel Sambuc     memset(&m, 0, sizeof(m));
15*433d6423SLionel Sambuc     m.VME_ENDPOINT = ep;
16*433d6423SLionel Sambuc 
17*433d6423SLionel Sambuc     result = _taskcall(VM_PROC_NR, VM_EXIT, &m);
18*433d6423SLionel Sambuc     return(result);
19*433d6423SLionel Sambuc }
20*433d6423SLionel Sambuc 
21*433d6423SLionel Sambuc 
22*433d6423SLionel Sambuc /*===========================================================================*
23*433d6423SLionel Sambuc  *                                vm_willexit				     *
24*433d6423SLionel Sambuc  *===========================================================================*/
vm_willexit(endpoint_t ep)25*433d6423SLionel Sambuc int vm_willexit(endpoint_t ep)
26*433d6423SLionel Sambuc {
27*433d6423SLionel Sambuc     message m;
28*433d6423SLionel Sambuc     int result;
29*433d6423SLionel Sambuc 
30*433d6423SLionel Sambuc     memset(&m, 0, sizeof(m));
31*433d6423SLionel Sambuc     m.VMWE_ENDPOINT = ep;
32*433d6423SLionel Sambuc 
33*433d6423SLionel Sambuc     result = _taskcall(VM_PROC_NR, VM_WILLEXIT, &m);
34*433d6423SLionel Sambuc     return(result);
35*433d6423SLionel Sambuc }
36*433d6423SLionel Sambuc 
37