diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-03-16 12:52:24 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-05-20 11:08:29 +0200 |
commit | aac601ac36c623247a51d442b2d6438b042d7515 (patch) | |
tree | 77830e67ac263e05d7841b7124ea500c818ae291 /kern/ipc_mig.c | |
parent | 7d76ea075c248b2ed64c69a5e5dd4493d943e628 (diff) | |
download | gnumach-aac601ac36c623247a51d442b2d6438b042d7515.tar.gz gnumach-aac601ac36c623247a51d442b2d6438b042d7515.tar.bz2 gnumach-aac601ac36c623247a51d442b2d6438b042d7515.zip |
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/ipc_mig.c')
-rw-r--r-- | kern/ipc_mig.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c index cc61ec76..22dac420 100644 --- a/kern/ipc_mig.c +++ b/kern/ipc_mig.c @@ -310,16 +310,18 @@ mig_strncpy(dest, src, len) MACRO_BEGIN \ ipc_space_t space = current_space(); \ ipc_entry_t entry; \ - mach_port_index_t index = MACH_PORT_INDEX(name); \ \ is_read_lock(space); \ assert(space->is_active); \ \ - if ((index >= space->is_table_size) || \ - (((entry = &space->is_table[index])->ie_bits & \ - (IE_BITS_GEN_MASK|MACH_PORT_TYPE_SEND)) != \ - (MACH_PORT_GEN(name) | MACH_PORT_TYPE_SEND))) { \ - is_read_unlock(space); \ + entry = ipc_entry_lookup (space, name); \ + if (entry == IE_NULL) { \ + is_read_unlock (space); \ + abort; \ + } \ + \ + if (IE_BITS_TYPE (entry->ie_bits) != MACH_PORT_TYPE_SEND) { \ + is_read_unlock (space); \ abort; \ } \ \ |