retire 64-bit conversion functions
[minix3.git] / lib / libsys / vm_info.c
blob0ff47c9783c29409b8c8f5566c0948d584753c93
2 #include "syslib.h"
4 #include <minix/vm.h>
6 /*===========================================================================*
7 * vm_info_stats *
8 *===========================================================================*/
9 int vm_info_stats(struct vm_stats_info *vsi)
11 message m;
13 m.VMI_WHAT = VMIW_STATS;
14 m.VMI_PTR = (void *) vsi;
16 return _taskcall(VM_PROC_NR, VM_INFO, &m);
19 /*===========================================================================*
20 * vm_info_usage *
21 *===========================================================================*/
22 int vm_info_usage(endpoint_t who, struct vm_usage_info *vui)
24 message m;
26 m.VMI_WHAT = VMIW_USAGE;
27 m.VMI_EP = who;
28 m.VMI_PTR = (void *) vui;
30 return _taskcall(VM_PROC_NR, VM_INFO, &m);
33 /*===========================================================================*
34 * vm_info_region *
35 *===========================================================================*/
36 int vm_info_region(endpoint_t who, struct vm_region_info *vri,
37 int count, vir_bytes *next)
39 message m;
40 int result;
42 m.VMI_WHAT = VMIW_REGION;
43 m.VMI_EP = who;
44 m.VMI_COUNT = count;
45 m.VMI_PTR = (void *) vri;
46 m.VMI_NEXT = *next;
48 if ((result = _taskcall(VM_PROC_NR, VM_INFO, &m)) != OK)
49 return result;
51 *next = m.VMI_NEXT;
52 return m.VMI_COUNT;