xref: /minix/minix/lib/libsys/proceventmask.c (revision e1cdaee1)
1 #include "syslib.h"
2 
3 #include <string.h>
4 
5 /*
6  * Subscribe to a certain set of process events from PM.  Subsequent calls will
7  * replace the set, and the empty set (a zero mask) will unsubscribe the caller
8  * altogether.  Usage restrictions apply; see PM's event.c for details.  Return
9  * OK or a negative error code.
10  */
11 int
12 proceventmask(unsigned int mask)
13 {
14 	message m;
15 
16 	memset(&m, 0, sizeof(m));
17 	m.m_lsys_pm_proceventmask.mask = mask;
18 
19 	return _taskcall(PM_PROC_NR, PM_PROCEVENTMASK, &m);
20 }
21