]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/commitdiff
frsh: RTEMS synchronization minor fixes
authorPetr Benes <benesp16@fel.cvut.cz>
Sun, 15 May 2011 07:59:22 +0000 (09:59 +0200)
committerPetr Benes <benesp16@fel.cvut.cz>
Sun, 15 May 2011 07:59:22 +0000 (09:59 +0200)
src/frsh/fres/sharedobj/fres_sharedobj.c
src/frsh/fres/synchobj/fres_synchobj.c
src/frsh/frsh_api/frsh_synchobj.c

index 0536894bb5cc9770bc515c8a0b3c0475ea6adf58..0e2ba78c5f27fd3f38a4a8d33573f2d1d3fd7dff 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef RTEMS
+
 /**
  * @file   fres_sharedobj.c
  * @author Dario Faggioli <faggioli@gandalf.sssup.it>
@@ -127,3 +129,4 @@ fres_sharedobj_print(char *prefix, const struct fres_sharedobj *s)
        printf("%s %s", prefix, sharedobj);
 }
 
+#endif
\ No newline at end of file
index 1f01d8b511d98afbce2a93f22b15ab6407e8c78a..12d984f6c5317a8cbd2a3ce1ff892f5b5fd70d61 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef RTEMS
+
 /**
  * @file   fres_synchobj.c
  * @author Dario Faggioli <faggioli@gandalf.sssup.it>
@@ -11,7 +13,9 @@
 #include <string.h>
 #include <stdio.h>
 #include <fcntl.h>
+#ifndef RTEMS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -207,3 +211,4 @@ fres_synchobj_print(char *prefix, const struct fres_synchobj *s)
        printf("%s %s", prefix, synchobj);
 }
 
+#endif
index 800e336d967827e7a337db6e9a97effd3e2251de..b101ebbb95600460fdcc7861bf094c9ab17328c2 100644 (file)
@@ -12,6 +12,7 @@
 #include <fres_synchobj.h>
 
 #include <frsh_core.h>
+#include <time.h>
 
 int frsh_synchobj_create(frsh_synchobj_handle_t *synch_handle)
 {
@@ -172,9 +173,13 @@ int frsh_timed_wait
                                                was_deadline_missed,
                                                was_budget_overrun);
 
+#ifdef RTEMS
+       ret = nanosleep(abs_time, NULL);        
+#else
        ret = clock_nanosleep(FOSA_CLOCK_REALTIME,
                              TIMER_ABSTIME,
                              abs_time, NULL);
+#endif
 
        __frsh_synchobj_set_wcet_and_deadline(thread, th_vres);
        frsh_vres_get_budget_and_period(th_vres->vres,