2005-04-21 16:53:53 +02:00
|
|
|
#include <minix/config.h>
|
|
|
|
|
|
|
|
#if ENABLE_MESSAGE_STATS
|
|
|
|
|
|
|
|
#include <lib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
PUBLIC int mstats(struct message_statentry *ms, int entries, int reset)
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
|
|
|
m.m1_i1 = entries;
|
|
|
|
m.m1_i2 = reset;
|
|
|
|
m.m1_p1 = (void *) ms;
|
|
|
|
|
2010-06-08 15:58:01 +02:00
|
|
|
if(_syscall(PM_PROC_NR, MSTATS, &m) < 0) {
|
2005-04-21 16:53:53 +02:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return m.m_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|