summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libports/manage-multithread.c5
-rw-r--r--libports/manage-one-thread.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index dcb6905d..60743d93 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -175,6 +175,11 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket,
pi = ports_lookup_port (bucket, inp->msgh_local_port, 0);
if (pi)
{
+ /* Store the objects address as the payload and set the
+ message type accordingly. This prevents us from
+ having to do another hash table lookup in the intran
+ functions if protected payloads are not supported by
+ the kernel. */
inp->msgh_bits = MACH_MSGH_BITS (
MACH_MSGH_BITS_REMOTE (inp->msgh_bits),
MACH_MSG_TYPE_PROTECTED_PAYLOAD);
diff --git a/libports/manage-one-thread.c b/libports/manage-one-thread.c
index 192907ac..b920338f 100644
--- a/libports/manage-one-thread.c
+++ b/libports/manage-one-thread.c
@@ -66,6 +66,11 @@ ports_manage_port_operations_one_thread (struct port_bucket *bucket,
pi = ports_lookup_port (bucket, inp->msgh_local_port, 0);
if (pi)
{
+ /* Store the objects address as the payload and set the
+ message type accordingly. This prevents us from
+ having to do another hash table lookup in the intran
+ functions if protected payloads are not supported by
+ the kernel. */
inp->msgh_bits = MACH_MSGH_BITS (
MACH_MSGH_BITS_REMOTE (inp->msgh_bits),
MACH_MSG_TYPE_PROTECTED_PAYLOAD);