1*433d6423SLionel Sambuc 2*433d6423SLionel Sambuc #include "syslib.h" 3*433d6423SLionel Sambuc 4*433d6423SLionel Sambuc #include <string.h> 5*433d6423SLionel Sambuc #include <minix/vm.h> 6*433d6423SLionel Sambuc 7*433d6423SLionel Sambuc /*===========================================================================* 8*433d6423SLionel Sambuc * vm_fork * 9*433d6423SLionel Sambuc *===========================================================================*/ vm_fork(endpoint_t ep,int slot,endpoint_t * childep)10*433d6423SLionel Sambucint vm_fork(endpoint_t ep, int slot, endpoint_t *childep) 11*433d6423SLionel Sambuc { 12*433d6423SLionel Sambuc message m; 13*433d6423SLionel Sambuc int result; 14*433d6423SLionel Sambuc 15*433d6423SLionel Sambuc memset(&m, 0, sizeof(m)); 16*433d6423SLionel Sambuc m.VMF_ENDPOINT = ep; 17*433d6423SLionel Sambuc m.VMF_SLOTNO = slot; 18*433d6423SLionel Sambuc 19*433d6423SLionel Sambuc result = _taskcall(VM_PROC_NR, VM_FORK, &m); 20*433d6423SLionel Sambuc 21*433d6423SLionel Sambuc *childep = m.VMF_CHILD_ENDPOINT; 22*433d6423SLionel Sambuc 23*433d6423SLionel Sambuc return(result); 24*433d6423SLionel Sambuc } 25*433d6423SLionel Sambuc 26