Module: xenomai-forge
Branch: next
Commit: 19bcdd5bf89600a0353005b41f04cca494fd02a8
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=19bcdd5bf89600a0353005b41f04cca494fd02a8

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Feb 20 09:28:05 2014 +0100

lib/cobalt: extend cobalt_event_inquire() with waitlist

---

 lib/cobalt/internal.c |   18 ++++++------------
 lib/cobalt/internal.h |    3 ++-
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/lib/cobalt/internal.c b/lib/cobalt/internal.c
index 5ecc71f..6d2b603 100644
--- a/lib/cobalt/internal.c
+++ b/lib/cobalt/internal.c
@@ -495,19 +495,13 @@ unsigned long cobalt_event_clear(cobalt_event_t *event,
        return __sync_fetch_and_and(&datp->value, ~bits);
 }
 
-int cobalt_event_inquire(cobalt_event_t *event, unsigned long *bits_r)
+int cobalt_event_inquire(cobalt_event_t *event,
+                        struct cobalt_event_info *info,
+                        pid_t *waitlist, size_t waitsz)
 {
-       struct cobalt_event_data *datp = get_event_data(event);
-
-       /*
-        * We don't guarantee clean readings, this service is
-        * primarily for debug purposes when the caller won't bet the
-        * house on the values returned.
-        */
-       __sync_synchronize();
-       *bits_r = datp->value;
-
-       return datp->nwaiters;
+       return XENOMAI_SKINCALL4(__cobalt_muxid,
+                                sc_cobalt_event_inquire, event,
+                                info, waitlist, waitsz);
 }
 
 int cobalt_sem_inquire(sem_t *sem, struct cobalt_sem_info *info,
diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h
index 70c1f05..da7efa8 100644
--- a/lib/cobalt/internal.h
+++ b/lib/cobalt/internal.h
@@ -119,7 +119,8 @@ unsigned long cobalt_event_clear(cobalt_event_t *event,
                                 unsigned long bits);
 
 int cobalt_event_inquire(cobalt_event_t *event,
-                        unsigned long *bits_r);
+                        struct cobalt_event_info *info,
+                        pid_t *waitlist, size_t waitsz);
 
 int cobalt_event_destroy(cobalt_event_t *event);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to