phunix/minix/lib/libc/sys/sprofile.c
David van Moolenbroek 5dd8da10c5 libc: resolve minix clang warnings
Change-Id: If6c42f7346cc1b00b387ae8d3b4f0df3ffb0244f
2014-09-30 20:35:56 +00:00

32 lines
596 B
C

#include <sys/cdefs.h>
#include "namespace.h"
#ifdef __weak_alias
__weak_alias(sprofile, _sprofile)
#endif
#include <lib.h>
#include <string.h>
#include <minix/profile.h>
int sprofile(int action,
int size,
int freq,
int type,
void *ctl_ptr,
void *mem_ptr)
{
message m;
memset(&m, 0, sizeof(m));
m.m_lc_pm_sprof.action = action;
m.m_lc_pm_sprof.mem_size = size;
m.m_lc_pm_sprof.freq = freq;
m.m_lc_pm_sprof.intr_type = type;
m.m_lc_pm_sprof.ctl_ptr = (vir_bytes)ctl_ptr;
m.m_lc_pm_sprof.mem_ptr = (vir_bytes)mem_ptr;
return _syscall(PM_PROC_NR, PM_SPROF, &m);
}