summaryrefslogtreecommitdiff
path: root/ipc/ipc_notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/ipc_notify.c')
-rw-r--r--ipc/ipc_notify.c132
1 files changed, 0 insertions, 132 deletions
diff --git a/ipc/ipc_notify.c b/ipc/ipc_notify.c
index 3dea9fc..6a3d381 100644
--- a/ipc/ipc_notify.c
+++ b/ipc/ipc_notify.c
@@ -50,19 +50,7 @@ mach_no_senders_notification_t ipc_notify_no_senders_template;
mach_send_once_notification_t ipc_notify_send_once_template;
mach_dead_name_notification_t ipc_notify_dead_name_template;
-#if MACH_IPC_COMPAT
-/*
- * When notification messages are received via the old
- * msg_receive trap, the msg_type field should contain
- * MSG_TYPE_EMERGENCY. We arrange for this by putting
- * MSG_TYPE_EMERGENCY into msgh_seqno, which
- * ipc_kmsg_copyout_compat copies to msg_type.
- */
-
-#define NOTIFY_MSGH_SEQNO MSG_TYPE_EMERGENCY
-#else /* MACH_IPC_COMPAT */
#define NOTIFY_MSGH_SEQNO 0
-#endif /* MACH_IPC_COMPAT */
/*
* Routine: ipc_notify_init_port_deleted
@@ -463,123 +451,3 @@ ipc_notify_dead_name(port, name)
ipc_mqueue_send_always(kmsg);
}
-
-#if MACH_IPC_COMPAT
-
-/*
- * Routine: ipc_notify_port_deleted_compat
- * Purpose:
- * Send a port-deleted notification.
- * Sends it to a send right instead of a send-once right.
- * Conditions:
- * Nothing locked.
- * Consumes a ref/sright for port.
- */
-
-void
-ipc_notify_port_deleted_compat(port, name)
- ipc_port_t port;
- mach_port_t name;
-{
- ipc_kmsg_t kmsg;
- mach_port_deleted_notification_t *n;
-
- kmsg = ikm_alloc(sizeof *n);
- if (kmsg == IKM_NULL) {
- printf("dropped port-deleted-compat (0x%08x, 0x%x)\n",
- port, name);
- ipc_port_release_send(port);
- return;
- }
-
- ikm_init(kmsg, sizeof *n);
- n = (mach_port_deleted_notification_t *) &kmsg->ikm_header;
- *n = ipc_notify_port_deleted_template;
-
- n->not_header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_PORT_SEND, 0);
- n->not_header.msgh_remote_port = (mach_port_t) port;
- n->not_port = name;
-
- ipc_mqueue_send_always(kmsg);
-}
-
-/*
- * Routine: ipc_notify_msg_accepted_compat
- * Purpose:
- * Send a msg-accepted notification.
- * Sends it to a send right instead of a send-once right.
- * Conditions:
- * Nothing locked.
- * Consumes a ref/sright for port.
- */
-
-void
-ipc_notify_msg_accepted_compat(port, name)
- ipc_port_t port;
- mach_port_t name;
-{
- ipc_kmsg_t kmsg;
- mach_msg_accepted_notification_t *n;
-
- kmsg = ikm_alloc(sizeof *n);
- if (kmsg == IKM_NULL) {
- printf("dropped msg-accepted-compat (0x%08x, 0x%x)\n",
- port, name);
- ipc_port_release_send(port);
- return;
- }
-
- ikm_init(kmsg, sizeof *n);
- n = (mach_msg_accepted_notification_t *) &kmsg->ikm_header;
- *n = ipc_notify_msg_accepted_template;
-
- n->not_header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_PORT_SEND, 0);
- n->not_header.msgh_remote_port = (mach_port_t) port;
- n->not_port = name;
-
- ipc_mqueue_send_always(kmsg);
-}
-
-/*
- * Routine: ipc_notify_port_destroyed_compat
- * Purpose:
- * Send a port-destroyed notification.
- * Sends it to a send right instead of a send-once right.
- * Conditions:
- * Nothing locked.
- * Consumes a ref/sright for port.
- * Consumes a ref for right, which should be a receive right
- * prepped for placement into a message. (In-transit,
- * or in-limbo if a circularity was detected.)
- */
-
-void
-ipc_notify_port_destroyed_compat(port, right)
- ipc_port_t port;
- ipc_port_t right;
-{
- ipc_kmsg_t kmsg;
- mach_port_destroyed_notification_t *n;
-
- kmsg = ikm_alloc(sizeof *n);
- if (kmsg == IKM_NULL) {
- printf("dropped port-destroyed-compat (0x%08x, 0x%08x)\n",
- port, right);
- ipc_port_release_send(port);
- ipc_port_release_receive(right);
- return;
- }
-
- ikm_init(kmsg, sizeof *n);
- n = (mach_port_destroyed_notification_t *) &kmsg->ikm_header;
- *n = ipc_notify_port_destroyed_template;
-
- n->not_header.msgh_bits = MACH_MSGH_BITS_COMPLEX |
- MACH_MSGH_BITS(MACH_MSG_TYPE_PORT_SEND, 0);
- n->not_header.msgh_remote_port = (mach_port_t) port;
- n->not_port = (mach_port_t) right;
-
- ipc_mqueue_send_always(kmsg);
-}
-
-#endif /* MACH_IPC_COMPAT */