]> rtime.felk.cvut.cz Git - frescor/fosa.git/blobdiff - src_marte/fosa_app_def_sched.c
Migrating FOSA trunk to d-ac2v2. Phase 1 moving FRSH-FOSA to FOSA
[frescor/fosa.git] / src_marte / fosa_app_def_sched.c
index b63cd075d8e491b866283ab1d8c913dcf78f5018..757f5beb7232e7eb87c9c75399bd54445a62e04e 100644 (file)
 // before suspend or activate it.
 // -----------------------------------------------------------------------
 
-#include "fosa_app_def_sched.h"
-#include "fosa_configuration_parameters.h"
-#include "fosa_threads_and_signals.h"
-#include "frsh_error.h"
-#include "frsh_fosa.h"
+#include "fosa.h"
 
 #include <pthread.h>
 #include <stdio.h>
@@ -367,7 +363,7 @@ void * scheduler_thread_code(void *arg) {
                sch_thread_data->scheduler_ops.signal
                   (scheduler_data,
                   event.event_info.siginfo.si_signo,
-                  *((frsh_signal_info_t *)(&(event.event_info.siginfo.si_value))),
+                  *((fosa_signal_info_t *)(&(event.event_info.siginfo.si_value))),
                   // the above casting construct is used to overcome the compiler
                   // restriction that does not allow casts between unions
                   &sched_actions,
@@ -519,7 +515,7 @@ int fosa_ads_scheduler_create
  * implementation and dependant applications
  **/
 int fosa_thread_attr_set_appscheduled
-        (frsh_thread_attr_t *attr,
+        (fosa_thread_attr_t *attr,
          bool appscheduled)
 {
    int error_code;
@@ -554,7 +550,7 @@ int fosa_thread_attr_set_appscheduled
  * implementation and dependant applications
  **/
 int fosa_thread_attr_get_appscheduled
-        (const frsh_thread_attr_t *attr,
+        (const fosa_thread_attr_t *attr,
          bool *appscheduled)
 {
    int policy, ret_value;
@@ -592,7 +588,7 @@ int fosa_thread_attr_get_appscheduled
  * implementation and dependant applications
  **/
 int fosa_thread_attr_set_appsched_params
-        (frsh_thread_attr_t *attr,
+        (fosa_thread_attr_t *attr,
          const void *param,
          size_t paramsize)
 {
@@ -622,7 +618,7 @@ int fosa_thread_attr_set_appsched_params
  * implementation and dependant applications
  **/
 int fosa_thread_attr_get_appsched_params
-        (const frsh_thread_attr_t *attr,
+        (const fosa_thread_attr_t *attr,
          void *param,
          size_t *paramsize)
 {
@@ -653,7 +649,7 @@ int fosa_thread_attr_get_appsched_params
  * implementation and dependant applications
  **/
 int fosa_ads_set_appscheduled
-        (frsh_thread_id_t thread,
+        (fosa_thread_id_t thread,
          bool appscheduled)
 {
    int error_code = 0;
@@ -696,7 +692,7 @@ int fosa_ads_set_appscheduled
  * implementation and dependant applications
  **/
 int fosa_ads_get_appscheduled
-        (frsh_thread_id_t thread,
+        (fosa_thread_id_t thread,
          bool *appscheduled)
 {
    int error_code, policy;
@@ -735,7 +731,7 @@ int fosa_ads_get_appscheduled
  * implementation and dependant applications
  **/
 int fosa_ads_set_appsched_params
-        (frsh_thread_id_t thread,
+        (fosa_thread_id_t thread,
          const void *param,
          size_t paramsize)
 {
@@ -766,7 +762,7 @@ int fosa_ads_set_appsched_params
  * implementation and dependant applications.
  **/
 int fosa_ads_get_appsched_params
-        (frsh_thread_id_t thread,
+        (fosa_thread_id_t thread,
          void *param,
          size_t *paramsize)
 {
@@ -820,7 +816,7 @@ int fosa_ads_get_appsched_params
  **/
 int fosa_adsactions_add_reject(
         fosa_ads_actions_t *sched_actions,
-        frsh_thread_id_t thread)
+        fosa_thread_id_t thread)
 {
 #ifdef FULL_ERROR_CHECKING
   // check errors
@@ -866,7 +862,7 @@ int fosa_adsactions_add_reject(
  **/
 int fosa_adsactions_add_activate(
         fosa_ads_actions_t *sched_actions,
-        frsh_thread_id_t thread,
+        fosa_thread_id_t thread,
         fosa_ads_urgency_t urgency)
 {
 #ifdef FULL_ERROR_CHECKING
@@ -909,7 +905,7 @@ int fosa_adsactions_add_activate(
  **/
 int fosa_adsactions_add_suspend(
         fosa_ads_actions_t *sched_actions,
-        frsh_thread_id_t thread)
+        fosa_thread_id_t thread)
 {
 #ifdef FULL_ERROR_CHECKING
    // check errors
@@ -985,7 +981,7 @@ int fosa_adsactions_add_timeout(
  **/
 int fosa_adsactions_add_thread_notification(
         fosa_ads_actions_t *sched_actions,
-        frsh_thread_id_t thread,
+        fosa_thread_id_t thread,
         fosa_clock_id_t clock_id,
         const struct timespec *at_time)
 {
@@ -1041,7 +1037,7 @@ int fosa_adsactions_add_thread_notification(
  * notify it to the system console and then terminate the FRSH
  * implementation and dependant applications
  **/
-int fosa_ads_set_handled_signal_set(frsh_signal_t set[], int size)
+int fosa_ads_set_handled_signal_set(fosa_signal_t set[], int size)
 {
    int i;
 
@@ -1076,7 +1072,7 @@ int fosa_ads_set_handled_signal_set(frsh_signal_t set[], int size)
  * notification message.
  *
  * Besides for the scheduler we don't have always a destinator
- * thread_id needed in frsh_signal_queue for OSE.
+ * thread_id needed in fosa_signal_queue for OSE.
  *
  * So the fosa implementation will solve this issue internally.
  *
@@ -1092,11 +1088,11 @@ int fosa_ads_set_handled_signal_set(frsh_signal_t set[], int size)
  * notify it to the system console and then terminate the FRSH
  * implementation and dependant applications
  **/
-int fosa_signal_queue_scheduler(frsh_signal_t signal, frsh_signal_info_t info)
+int fosa_signal_queue_scheduler(fosa_signal_t signal, fosa_signal_info_t info)
 {
    // In MaRTE OS this function is completely equivalent to
    // fosa_signal_queue, because there is no notion of receiver.
-   frsh_thread_id_t receiver = 0; // Dummy value, not used by MaRTE OS
+   fosa_thread_id_t receiver = 0; // Dummy value, not used by MaRTE OS
    return fosa_signal_queue(signal, info, receiver);
 }