Sanchayan Maity
8501cb7ed8
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.
27 lines
652 B
C
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 */
|