minix/lib/libsys/vm_fork.c
Lionel Sambuc fe3b8cf035 3.3.0j Squashed for testing purposes
Change-Id: Ic32d886158c29b23f322eb777894be3f9b438caf
2013-11-19 18:18:58 +01:00

26 lines
560 B
C

#include "syslib.h"
#include <string.h>
#include <minix/vm.h>
/*===========================================================================*
* vm_fork *
*===========================================================================*/
int vm_fork(endpoint_t ep, int slot, endpoint_t *childep)
{
message m;
int result;
memset(&m, 0, sizeof(m));
m.VMF_ENDPOINT = ep;
m.VMF_SLOTNO = slot;
result = _taskcall(VM_PROC_NR, VM_FORK, &m);
*childep = m.VMF_CHILD_ENDPOINT;
return(result);
}