This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 8d862231a0016dcf40f269e73d5b189606038490
Author: Justus Winter <[email protected]>
Date:   Fri Aug 14 10:03:46 2015 +0200

    libports: clarify why we emulate protected payloads
    
    The Hurd uses protected payloads to improve the receiver lookup on the
    server side to the point that we no longer do a hash table lookup in
    the dispatch code.
    
    If the kernel does not support protected payloads, we degrade
    gracefully, do one lookup in libports' dispatching code, and emulate
    the protected payload feature to still save one hash table lookup in
    the intrans function.
    
    * libports/manage-multithread.c (ports_manage_port_operations_multithread):
    Add comment.
    * libports/manage-one-thread.c (ports_manage_port_operations_one_thread):
    Likewise.
---
 libports/manage-multithread.c | 5 +++++
 libports/manage-one-thread.c  | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index dcb6905..60743d9 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 192907a..b920338 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);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git

Reply via email to