summaryrefslogtreecommitdiff
path: root/kern/ipc_mig.c
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-03-20 11:31:36 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:36 +0200
commitec9defc2912e86a7e682ec6e37aac102fa69d94d (patch)
treed8ef07ee8146566139505f5236b3fb0eb273ab2f /kern/ipc_mig.c
parentb80e893edaa066af2a0c5c725c0c394e7c7c20e0 (diff)
2006-03-20 Thomas Schwinge <tschwinge@gnu.org>
* DEVELOPMENT: Document the NORMA removal. 2006-03-20 Leonardo Lopes Pereira <leonardolopespereira@gmail.com> Remove unused and unsupported code. Consult the file `DEVELOPMENT' for details. [patch #4982] * bogus/norma_device.h: Remove file. * bogus/norma_ether.h: Likewise. * bogus/norma_ipc.h: Likewise. * bogus/norma_task.h: Likewise. * bogus/norma_vm.h: Likewise. * include/mach/mach_norma.defs: Likewise. * include/mach/norma_task.defs: Likewise. * include/mach/norma_special_ports.h: Likewise. * Makefile.in (bogus-files): Remove `norma_device.h', `norma_ether.h', `norma_ipc.h', `norma_task.h' and `norma_vm.h'. (mach-headers): Remove `mach_norma.defs', `norma_task.defs' and `norma_special_ports.h'. * device/ds_routines.c: Don't include <norma_device.h> anymore and adopt all users of NORMA_DEVICE as if it were always defined to `0'. * device/net_io.c: Likewise for <norma_ether.h>, NORMA_ETHER. * kern/machine.c: Likewise. * ddb/db_command.c: Likevise for <norma_ipc.h>, NORMA_IPC. * ipc/ipc_init.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_port.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/mach_msg.c: Likewise. * kern/ast.c: Likewise. * kern/debug.c: Likewise. * kern/exception.c: Likewise. * kern/startup.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_map.c: Likewise. * kern/ipc_kobject.c: Likewise for <norma_task.h>, NORMA_TASK. * kern/task.c: Likewise. * kern/task.h: Likewise. * ddb/db_command.c: Likewise for <norma_vm.h>, NORMA_VM. * device/dev_pager.c: Likewise. * include/mach/mach_types.defs: Likewise. * include/mach/mach_types.h: Likewise. * include/mach/memory_object_default.defs: Likewise. * include/mach/memory_object.defs: Likewise. * ipc/ipc_kmsg.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/startup.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise.
Diffstat (limited to 'kern/ipc_mig.c')
-rw-r--r--kern/ipc_mig.c118
1 files changed, 0 insertions, 118 deletions
diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c
index f90c512..4f45eba 100644
--- a/kern/ipc_mig.c
+++ b/kern/ipc_mig.c
@@ -24,8 +24,6 @@
* the rights to redistribute these changes.
*/
-#include <norma_vm.h>
-
#include <mach/boolean.h>
#include <mach/port.h>
#include <mach/message.h>
@@ -94,122 +92,6 @@ mach_msg_rpc_from_kernel(msg, send_size, reply_size)
panic("mach_msg_rpc_from_kernel"); /*XXX*/
}
-#if NORMA_VM
-/*
- * Routine: mach_msg_rpc_from_kernel
- * Purpose:
- * Send a message from the kernel and receive a reply.
- * Uses ith_rpc_reply for the reply port.
- *
- * This is used by the client side of KernelUser interfaces
- * to implement Routines.
- * Conditions:
- * Nothing locked.
- * Returns:
- * MACH_MSG_SUCCESS Sent the message.
- * MACH_RCV_PORT_DIED The reply port was deallocated.
- */
-
-mach_msg_return_t
-mach_msg_rpc_from_kernel(
- mach_msg_header_t *msg,
- mach_msg_size_t send_size,
- mach_msg_size_t rcv_size)
-{
- ipc_thread_t self = current_thread();
- ipc_port_t reply;
- ipc_kmsg_t kmsg;
- mach_port_seqno_t seqno;
- mach_msg_return_t mr;
-
- assert(MACH_PORT_VALID(msg->msgh_remote_port));
- assert(msg->msgh_local_port == MACH_PORT_NULL);
-
- mr = ipc_kmsg_get_from_kernel(msg, send_size, &kmsg);
- if (mr != MACH_MSG_SUCCESS)
- panic("mach_msg_rpc_from_kernel");
-
- ipc_kmsg_copyin_from_kernel(kmsg);
-
- ith_lock(self);
- assert(self->ith_self != IP_NULL);
-
- reply = self->ith_rpc_reply;
- if (reply == IP_NULL) {
- ith_unlock(self);
- reply = ipc_port_alloc_reply();
- ith_lock(self);
- if ((reply == IP_NULL) ||
- (self->ith_rpc_reply != IP_NULL))
- panic("mach_msg_rpc_from_kernel");
- self->ith_rpc_reply = reply;
- }
-
- /* insert send-once right for the reply port */
- kmsg->ikm_header.msgh_local_port =
- (mach_port_t) ipc_port_make_sonce(reply);
-
- ipc_port_reference(reply);
- ith_unlock(self);
-
- ipc_mqueue_send_always(kmsg);
-
- for (;;) {
- ipc_mqueue_t mqueue;
-
- ip_lock(reply);
- if (!ip_active(reply)) {
- ip_unlock(reply);
- ipc_port_release(reply);
- return MACH_RCV_PORT_DIED;
- }
-
- assert(reply->ip_pset == IPS_NULL);
- mqueue = &reply->ip_messages;
- imq_lock(mqueue);
- ip_unlock(reply);
-
- mr = ipc_mqueue_receive(mqueue, MACH_MSG_OPTION_NONE,
- MACH_MSG_SIZE_MAX,
- MACH_MSG_TIMEOUT_NONE,
- FALSE, IMQ_NULL_CONTINUE,
- &kmsg, &seqno);
- /* mqueue is unlocked */
- if (mr == MACH_MSG_SUCCESS)
- break;
-
- assert((mr == MACH_RCV_INTERRUPTED) ||
- (mr == MACH_RCV_PORT_DIED));
-
- while (thread_should_halt(self)) {
- /* don't terminate while holding a reference */
- if (self->ast & AST_TERMINATE)
- ipc_port_release(reply);
- thread_halt_self();
- }
- }
- ipc_port_release(reply);
-
- kmsg->ikm_header.msgh_seqno = seqno;
-
- if (rcv_size < kmsg->ikm_header.msgh_size) {
- ipc_kmsg_copyout_dest(kmsg, ipc_space_reply);
- ipc_kmsg_put_to_kernel(msg, kmsg, kmsg->ikm_header.msgh_size);
- return MACH_RCV_TOO_LARGE;
- }
-
- /*
- * We want to preserve rights and memory in reply!
- * We don't have to put them anywhere; just leave them
- * as they are.
- */
-
- ipc_kmsg_copyout_to_kernel(kmsg, ipc_space_reply);
- ipc_kmsg_put_to_kernel(msg, kmsg, kmsg->ikm_header.msgh_size);
- return MACH_MSG_SUCCESS;
-}
-#endif /* NORMA_VM */
-
/*
* Routine: mach_msg_abort_rpc
* Purpose: