commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 14/61: libpager: fix notify_port_t receiver lookups


From: Samuel Thibault
Subject: [hurd] 14/61: libpager: fix notify_port_t receiver lookups
Date: Tue, 27 May 2014 08:32:10 +0000

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

sthibault pushed a commit to branch upstream
in repository hurd.

commit f1aa15a509d4249b19bb3d7f1f388829dd5135f8
Author: Justus Winter <address@hidden>
Date:   Tue Apr 15 13:54:19 2014 +0200

    libpager: fix notify_port_t receiver lookups
    
    This fixes one more occurence of a notify_port_t receiver lookup that
    I overlooked in 5a4926dd52aed56913cbe10592063ff0da753700.
    
    * libpager/no-senders.c: Include "notify_S.h" so that the compiler can
    spot such mistakes in the future.
    (_pager_do_seqnos_mach_notify_no_senders): Fix receiver lookup.
---
 libpager/no-senders.c | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/libpager/no-senders.c b/libpager/no-senders.c
index 83a2c88..c21dfc2 100644
--- a/libpager/no-senders.c
+++ b/libpager/no-senders.c
@@ -18,24 +18,19 @@
 
 #include "priv.h"
 #include <mach/notify.h>
+#include "notify_S.h"
 
 error_t
-_pager_do_seqnos_mach_notify_no_senders (mach_port_t notify,
+_pager_do_seqnos_mach_notify_no_senders (struct port_info *pi,
                                         mach_port_seqno_t seqno,
                                         mach_port_mscount_t mscount)
 {
-  struct pager *p = ports_lookup_port (0, notify, _pager_class);
-  
-  if (!p)
+  if (!pi ||
+      pi->class != _pager_class)
     return EOPNOTSUPP;
-  
-  pthread_mutex_lock (&p->interlock);
-  _pager_wait_for_seqno (p, seqno);
-  _pager_release_seqno (p, seqno);
-  pthread_mutex_unlock (&p->interlock);
-  
-  ports_no_senders (p, mscount);
-
-  ports_port_deref (p);
+
+  _pager_update_seqno_p ((struct pager *) pi, seqno);
+  ports_no_senders (pi, mscount);
+
   return 0;
 }

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]