minix/minix/lib/libsys/sys_mq_request_notify.c
Sanchayan Maity 8501cb7ed8 Allow users to request a asynchronous notification
This patch adds functionality to request an asynchronous notification
if some other process has send a message to it. We currently send a
SIGALRM to avoid any changes to core infrastructure of signal handling.
Ideally we should implement a separate signal for this. Currently there
is an obvious disadvantage of not being able to use SIGALRM with alarm,
if we are using this functionality.
2016-03-22 17:51:09 +05:30

16 lines
320 B
C

#include "syslib.h"
#include <string.h>
#include <machine/archtypes.h>
#include <minix/timers.h>
#include <minix/sysutil.h>
#include <minix/vm.h>
int sys_mq_request_notify(int notify_on_off)
{
message m;
m.m_lsys_krn_sys_mqueue_notify.notify_on_off = notify_on_off;
return (_kernel_call(SYS_MQ_REQ_NOTIFY, &m));
}