#include <mach/notify_server.h>
mach/notify_server.h
macro_notify_server_
#define _notify_server_
macronotify_MSG_COUNT
#define notify_MSG_COUNT 9
functiondo_mach_notify_port_deleted
extern MIG_SERVER_ROUTINE kern_return_t do_mach_notify_port_deleted( mach_port_t notify, mach_port_name_t name )
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Handle the current instance of a port-deleted notification.
A do_mach_notify_port_deleted function is called by notify_server as the result of a kernel message indicating that a port name is no longer usable (that is, it no longer names a valid right), typically as a result of the right so named being consumed or moved. In contrast, a dead-name notification indicates that the port name is now dead as the result of the associated receive right having died. notify is the port named via mach_port_request_notification or mach_msg.
Notes. This interface is machine word length specific because of the port name parameter.
functiondo_mach_notify_port_destroyed
extern MIG_SERVER_ROUTINE kern_return_t do_mach_notify_port_destroyed( mach_port_t notify, mach_port_t rights )
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Handle the current instance of a port-destroyed notification.
A do_mach_notify_port_destroyed function is called by notify_server as the result of a kernel message indicating that a receive right would have been destroyed. notify is the port named via mach_port_request_notification or mach_msg.
Notes. This interface is machine word length specific because of the port name parameter.
functiondo_mach_notify_no_senders
extern MIG_SERVER_ROUTINE kern_return_t do_mach_notify_no_senders( mach_port_t notify, mach_port_mscount_t mscount )
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Handle the current instance of a no-more-senders notification.
A do_mach_notify_no_senders function is called by notify_server as the result of a kernel message indicating that a receive right has no more senders. notify is the port named via mach_port_request_notification.
functiondo_mach_notify_send_once
extern MIG_SERVER_ROUTINE kern_return_t do_mach_notify_send_once(mach_port_t notify)
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Handle the current instance of a send-once notification.
A do_mach_notify_send_once function is called by notify_server as the result of a kernel message indicating that a send-once right was in any way destroyed. notify is the port for which a send-once right was destroyed.
functiondo_mach_notify_dead_name
extern MIG_SERVER_ROUTINE kern_return_t do_mach_notify_dead_name( mach_port_t notify, mach_port_name_t name )
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Handle the current instance of a dead-name notification.
A do_mach_notify_dead_name function is called by notify_server as the result of a kernel message indicating that the port name is now dead as the result of the associated receive right having died. In contrast, a port-deleted notification indicates that the port name is no longer usable (that is, it no longer names a valid right), typically as a result of the right so named being consumed or moved. notify is the port named via mach_port_request_notification or mach_msg.
Notes. This interface is machine word length specific because of the port name parameter.
functionnotify_server
extern boolean_t notify_server(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Handle the next kernel-generated IPC notification.
The notify_server function is the MIG generated server handling function to handle messages from the kernel corresponding to IPC notifications. Such messages are delivered to the notification port named in a mach_msg or mach_port_request_notification call. The notify_server function performs all necessary argument handling for this kernel message and calls the appropriate handling function. These functions must be supplied by the caller.
| TRUE | The message was handled and the appropriate function was called. |
| FALSE | The message did not apply to the notification mechanism and no other action was taken. |
functionnotify_server_routine
extern mig_routine_t notify_server_routine(mach_msg_header_t *InHeadP)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/mach/notify.defs
Returns the MIG dispatch function for the notify subsystem request whose msgh_id is found in InHeadP, or a null pointer if the message is not a request of the subsystem. Alternative to the combined demultiplexer for servers that look up and invoke the handler themselves.
structdo_notify_subsystem
Description of this subsystem, for use in direct RPC
| mig_server_routine_t | server | Server routine |
| mach_msg_id_t | start | Min routine number |
| mach_msg_id_t | end | Max routine number + 1 |
| unsigned int | maxsize | Max msg size |
| vm_address_t | reserved | Reserved |
| struct routine_descriptor[9] | routine |
variabledo_notify_subsystem
extern const struct do_notify_subsystem { mig_server_routine_t server; /* Server routine */ mach_msg_id_t start; /* Min routine number */ mach_msg_id_t end; /* Max routine number + 1 */ unsigned int maxsize; /* Max msg size */ vm_address_t reserved; /* Reserved */ struct routine_descriptor /* Array of routine descriptors */ routine[9]; } do_notify_subsystemmacrosubsystem_to_name_map_notify
#define subsystem_to_name_map_notify { "mach_notify_port_deleted", 65 },
{ "mach_notify_port_destroyed", 69 },
{ "mach_notify_no_senders", 70 },
{ "mach_notify_send_once", 71 },
{ "mach_notify_dead_name", 72 }