int io_notify ( resmgr_context_t *ctp,
io_notify_t *msg,
RESMGR_OCB_T *ocb )
Classification: I/O
Default handler: none
Helper functions: iofunc_notify(), iofunc_notify_remove(), iofunc_notify_remove_strict(), iofunc_notify_trigger(), iofunc_notify_trigger_strict()
Client functions: select(), ionotify()
Messages: _IO_NOTIFY
Data structure:
struct _io_notify {
uint16_t type;
uint16_t combine_len;
int32_t action;
int32_t flags;
struct sigevent event;
/* Following fields only valid if (flags & _NOTIFY_COND_EXTEN) */
int32_t mgr[2]; /* For use by manager */
int32_t flags_extra_mask;
int32_t flags_exten;
int32_t nfds;
int32_t fd_first;
int32_t nfds_ready;
int64_t timo;
/* struct pollfd fds[nfds]; */
};
struct _io_notify_reply {
uint32_t zero;
uint32_t flags; /* action above */
int32_t flags2; /* flags above */
struct sigevent event;
/* Following fields only updated by new managers (if valid) */
int32_t mgr[2]; /* For use by manager */
int32_t flags_extra_mask;
int32_t flags_exten;
int32_t nfds;
int32_t fd_first;
int32_t nfds_ready;
int64_t timo;
/* struct pollfd fds[nfds]; */
};
typedef union {
struct _io_notify i;
struct _io_notify_reply o;
} io_notify_t;
Description: The handler is responsible for installing, polling, or removing a notification handler. The action and flags determine the kind of notification operation and conditions; the event is a struct sigevent structure that defines the notification event (if any) that the client wishes to be signaled with. You'd use the MsgDeliverEvent() or iofunc_notify_trigger() functions to deliver the event to the client.
Returns: The status via the helper macro _RESMGR_STATUS(); the flags are returned via message reply.