summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-15 13:54:19 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-15 13:54:19 +0200
commitf1aa15a509d4249b19bb3d7f1f388829dd5135f8 (patch)
tree97ff550d415e1c131f31d33446a121bb586b0d86
parent5a4926dd52aed56913cbe10592063ff0da753700 (diff)
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.
-rw-r--r--libpager/no-senders.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/libpager/no-senders.c b/libpager/no-senders.c
index 83a2c889..c21dfc2f 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;
}