etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / sprofile.c
blob0fe27c43f28fe8a7e6a71f888883e8eca14fb639
1 #include <sys/cdefs.h>
2 #include "namespace.h"
4 #ifdef __weak_alias
5 __weak_alias(sprofile, _sprofile)
6 #endif
8 #include <lib.h>
9 #include <string.h>
10 #include <minix/profile.h>
12 int sprofile(int action,
13 int size,
14 int freq,
15 int type,
16 void *ctl_ptr,
17 void *mem_ptr)
19 message m;
21 memset(&m, 0, sizeof(m));
22 m.m_lc_pm_sprof.action = action;
23 m.m_lc_pm_sprof.mem_size = size;
24 m.m_lc_pm_sprof.freq = freq;
25 m.m_lc_pm_sprof.intr_type = type;
26 m.m_lc_pm_sprof.ctl_ptr = (vir_bytes)ctl_ptr;
27 m.m_lc_pm_sprof.mem_ptr = (vir_bytes)mem_ptr;
29 return _syscall(PM_PROC_NR, PM_SPROF, &m);