custom message type for VM_QUERY_EXIT
[minix3.git] / lib / libc / sys-minix / cprofile.c
blob512d42405ba0dbffaf698f0526010c9949c80c6b
1 #include <sys/cdefs.h>
2 #include "namespace.h"
4 #ifdef __weak_alias
5 __weak_alias(cprofile, _cprofile)
6 #endif
8 #include <lib.h>
9 #include <string.h>
10 #include <minix/profile.h>
12 int cprofile(int action, int size, void *ctl_ptr, void *mem_ptr)
14 message m;
16 memset(&m, 0, sizeof(m));
17 m.PROF_ACTION = action;
18 m.PROF_MEM_SIZE = size;
19 m.PROF_CTL_PTR = (void *) ctl_ptr;
20 m.PROF_MEM_PTR = (void *) mem_ptr;
22 return _syscall(PM_PROC_NR, PM_CPROF, &m);