minix/lib/libc/sys-minix/sprofile.c
Lionel Sambuc 8ad307eeed Message type for SYS_SPROF and PM_SPROF.
Change-Id: I598f88af47737be0172236fa9ad24058b50d3942
2014-07-28 17:06:26 +02:00

31 lines
574 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 = ctl_ptr;
m.m_lc_pm_sprof.mem_ptr = mem_ptr;
return _syscall(PM_PROC_NR, PM_SPROF, &m);
}