summaryrefslogtreecommitdiff
path: root/minix/lib/libsys/vm_fork.c
blob: 52c3f306ea9342c8e66e67dbe5e49046cfe5f61c (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

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