From 96c01087a657dfc1c877b63e9e6b0f45c37b9c78 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 3 Dec 2006 20:16:16 +0000 Subject: 2006-12-03 Thomas Schwinge [patch #5017 --- ``Remove obsolete IPC interfaces.''] * DEVELOPMENT: Document the removal. * configfrag.ac (MACH_IPC_COMPAT): Don't define. 2006-12-03 Leonardo Lopes Pereira [patch #5017 --- ``Remove obsolete IPC interfaces.''] * kern/act.c [MIGRATING_THREADS]: Don't include . * kern/act.h: Likewise. * i386/include/mach/i386/machine_types.defs: Adapt all users of MACH_IPC_COMPAT as if it were always defined to `0'. * include/mach/mach.defs: Likewise. * include/mach/mach_param.h: Likewise. * include/mach/mach_traps.h: Likewise. * include/mach/message.h: Likewise. * include/mach/mig_errors.h: Likewise. * include/mach/notify.h: Likewise. * include/mach/port.h: Likewise. * include/mach/std_types.defs: Likewise. * include/mach/syscall_sw.h: Likewise. * include/mach/task_special_ports.h: Likewise. * include/mach/thread_special_ports.h: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_notify.h: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_object.h: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_port.h: Likewise. * ipc/ipc_right.c: Likewise. * ipc/ipc_right.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/mach_debug.c: Likewise. * ipc/mach_msg.c: Likewise * ipc/mach_msg.h: Likewise. * ipc/mach_port.c: Likewise. * kern/act.c: Likewise. * kern/act.h: Likewise. * kern/ipc_host.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/syscall_sw.c: Likewise. * kern/thread.h: Likewise. --- ipc/ipc_notify.c | 132 ------------------------------------------------------- 1 file changed, 132 deletions(-) (limited to 'ipc/ipc_notify.c') 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 */ -- cgit v1.2.3