minix/lib/libc/sys-minix/cprofile.c
Lionel Sambuc 64fb3a184c Message type for SYS_CPROF and PM_CPROF.
Change-Id: I2dc3d9d95c2a2b4c5fdbceae359b0be2bbdf9fb5
2014-07-28 17:06:26 +02:00

25 lines
476 B
C

#include <sys/cdefs.h>
#include "namespace.h"
#ifdef __weak_alias
__weak_alias(cprofile, _cprofile)
#endif
#include <lib.h>
#include <string.h>
#include <minix/profile.h>
int cprofile(int action, int size, void *ctl_ptr, void *mem_ptr)
{
message m;
memset(&m, 0, sizeof(m));
m.m_lc_pm_cprof.action = action;
m.m_lc_pm_cprof.mem_size = size;
m.m_lc_pm_cprof.ctl_ptr = ctl_ptr;
m.m_lc_pm_cprof.mem_ptr = mem_ptr;
return _syscall(PM_PROC_NR, PM_CPROF, &m);
}