some coverity fixes.
[minix.git] / lib / libc / sys-minix / sprofile.c
blobbd9397c288d6b924601d2f508066993fa31cf300
1 #include <sys/cdefs.h>
2 #include "namespace.h"
4 #ifdef __weak_alias
5 #define sprofile _sprofile
6 __weak_alias(sprofile, _sprofile)
7 #endif
9 #include <lib.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 m.PROF_ACTION = action;
22 m.PROF_MEM_SIZE = size;
23 m.PROF_FREQ = freq;
24 m.PROF_INTR_TYPE = type;
25 m.PROF_CTL_PTR = (void *) ctl_ptr;
26 m.PROF_MEM_PTR = (void *) mem_ptr;
28 return _syscall(PM_PROC_NR, SPROF, &m);