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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Feb 17 18:24:02 2014 +0100

lib/cobalt: introduce cobalt_sem_inquire()

---

 lib/cobalt/internal.c |   10 ++++++++++
 lib/cobalt/internal.h |    5 +++++
 2 files changed, 15 insertions(+)

diff --git a/lib/cobalt/internal.c b/lib/cobalt/internal.c
index c47f8dc..31954e7 100644
--- a/lib/cobalt/internal.c
+++ b/lib/cobalt/internal.c
@@ -509,3 +509,13 @@ int cobalt_event_inquire(cobalt_event_t *event, unsigned 
long *bits_r)
 
        return datp->nwaiters;
 }
+
+int cobalt_sem_inquire(sem_t *sem, struct cobalt_sem_info *info,
+                      pid_t *waitlist, size_t waitsz)
+{
+       struct __shadow_sem *_sem = &((union cobalt_sem_union 
*)sem)->shadow_sem;
+       
+       return XENOMAI_SKINCALL4(__cobalt_muxid,
+                                sc_cobalt_sem_inquire, _sem,
+                                info, waitlist, waitsz);
+}
diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h
index 6cbe395..c1845bb 100644
--- a/lib/cobalt/internal.h
+++ b/lib/cobalt/internal.h
@@ -20,6 +20,7 @@
 
 #include <signal.h>
 #include <pthread.h>
+#include <semaphore.h>
 #include <errno.h>
 #include <time.h>
 #include <nocore/atomic.h>
@@ -30,6 +31,7 @@
 #include <cobalt/uapi/monitor.h>
 #include <cobalt/uapi/thread.h>
 #include <cobalt/uapi/cond.h>
+#include <cobalt/uapi/sem.h>
 #include <xeno_config.h>
 #include "current.h"
 
@@ -121,6 +123,9 @@ int cobalt_event_inquire(cobalt_event_t *event,
 
 int cobalt_event_destroy(cobalt_event_t *event);
 
+int cobalt_sem_inquire(sem_t *sem, struct cobalt_sem_info *info,
+                      pid_t *waitlist, size_t waitsz);
+
 void cobalt_print_init(void);
 
 void cobalt_print_exit(void);


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

Reply via email to