X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/fosa.git/blobdiff_plain/3d1082a76a4d382dfc8a4c747f4de8300d48a978..37a7e2d45b116e61074de9861ffd192933c7d06a:/src_marte/fosa_app_def_sched.c diff --git a/src_marte/fosa_app_def_sched.c b/src_marte/fosa_app_def_sched.c index b63cd07..757f5be 100644 --- a/src_marte/fosa_app_def_sched.c +++ b/src_marte/fosa_app_def_sched.c @@ -75,11 +75,7 @@ // 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 #include @@ -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); }