minix/minix/kernel/system/do_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

27 lines
652 B
C

/* The kernel call implemented in this file:
* m_type: SYS_MQ_REQUEST_NOTIFY
*
*/
#include "kernel/mqueue.h"
#include "kernel/system.h"
#include "kernel/vm.h"
#include <signal.h>
#include <string.h>
#include <assert.h>
#include <minix/endpoint.h>
#include <minix/u64.h>
#if USE_MQ_IPC
/*===========================================================================*
* do_mq_request_notify *
*===========================================================================*/
int do_mq_request_notify(struct proc * caller, message * m_ptr)
{
return mq_notify(m_ptr->m_lsys_krn_sys_mqueue_notify.notify_on_off);
}
#endif /* USE_MQ_IPC */