summaryrefslogtreecommitdiff
path: root/kern/exception.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-03-16 12:52:24 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-05-20 11:08:29 +0200
commitaac601ac36c623247a51d442b2d6438b042d7515 (patch)
tree77830e67ac263e05d7841b7124ea500c818ae291 /kern/exception.c
parent7d76ea075c248b2ed64c69a5e5dd4493d943e628 (diff)
ipc: undo manual inlining of `ipc_entry_X' functions
Today we can rely on the compiler to inline functions. Undoing this manual optimization is a first step to replace the IPC tables. * ipc/mach_msg.c (mach_msg_trap): Undo the manual inlining of `ipc_entry_lookup', `ipc_entry_dealloc', and `ipc_entry_get'. * ipc/ipc_kmsg.c (ipc_kmsg_copyin_header, ipc_kmsg_copyout_header): Likewise. * kern/exception.c (exception_raise): Likewise. * kern/ipc_mig.c (fast_send_right_lookup): Likewise.
Diffstat (limited to 'kern/exception.c')
-rw-r--r--kern/exception.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/kern/exception.c b/kern/exception.c
index 7954fba..6e84c0a 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -603,30 +603,18 @@ exception_raise(
ip_unlock(reply_port);
{
- ipc_entry_t table;
+ kern_return_t kr;
ipc_entry_t entry;
- mach_port_index_t index;
-
- /* optimized ipc_entry_get */
-
- table = space->is_table;
- index = table->ie_next;
- if (index == 0)
+ kr = ipc_entry_get (space, &exc->Head.msgh_remote_port, &entry);
+ if (kr)
goto abort_copyout;
-
- entry = &table[index];
- table->ie_next = entry->ie_next;
- entry->ie_request = 0;
-
{
mach_port_gen_t gen;
assert((entry->ie_bits &~ IE_BITS_GEN_MASK) == 0);
gen = entry->ie_bits + IE_BITS_GEN_ONE;
- exc->Head.msgh_remote_port = MACH_PORT_MAKE(index, gen);
-
/* optimized ipc_right_copyout */
entry->ie_bits = gen | (MACH_PORT_TYPE_SEND_ONCE | 1);