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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri May 10 15:48:13 2013 +0200

copperplate/timerobj: wrap all sema4 calls appropriately

---

 lib/copperplate/timerobj.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/copperplate/timerobj.c b/lib/copperplate/timerobj.c
index ce778d4..efa0236 100644
--- a/lib/copperplate/timerobj.c
+++ b/lib/copperplate/timerobj.c
@@ -174,7 +174,7 @@ static void *timerobj_server(void *arg)
        timersv_init_corespec("timer-internal");
        threadobj_set_current(THREADOBJ_IRQCONTEXT);
        /* Handshake with timerobj_spawn_server(). */
-       sem_post(&svsync);
+       __RT(sem_post(&svsync));
 
        for (;;) {
                ret = timersv_pend_corespec();
@@ -228,6 +228,8 @@ static int timerobj_spawn_server(void)
                                             PTHREAD_STACK_MIN * 16,
                                             PTHREAD_CREATE_DETACHED,
                                             &svthread));
+       if (ret)
+               return ret;
 
        /* Wait for timer server to initialize. */
        do


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

Reply via email to