2008-11-19 13:26:10 +01:00
|
|
|
|
|
|
|
#include "syslib.h"
|
|
|
|
|
2013-11-03 22:33:44 +01:00
|
|
|
#include <string.h>
|
2008-11-19 13:26:10 +01:00
|
|
|
#include <minix/vm.h>
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* vm_fork *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int vm_fork(endpoint_t ep, int slot, endpoint_t *childep)
|
2008-11-19 13:26:10 +01:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
int result;
|
|
|
|
|
2013-11-03 22:33:44 +01:00
|
|
|
memset(&m, 0, sizeof(m));
|
2008-11-19 13:26:10 +01:00
|
|
|
m.VMF_ENDPOINT = ep;
|
|
|
|
m.VMF_SLOTNO = slot;
|
|
|
|
|
|
|
|
result = _taskcall(VM_PROC_NR, VM_FORK, &m);
|
|
|
|
|
|
|
|
*childep = m.VMF_CHILD_ENDPOINT;
|
|
|
|
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|