X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/fosa.git/blobdiff_plain/3d1082a76a4d382dfc8a4c747f4de8300d48a978..37a7e2d45b116e61074de9861ffd192933c7d06a:/src_marte/fosa_long_jump.c diff --git a/src_marte/fosa_long_jump.c b/src_marte/fosa_long_jump.c index 417c94a..7a29265 100644 --- a/src_marte/fosa_long_jump.c +++ b/src_marte/fosa_long_jump.c @@ -64,9 +64,9 @@ //================================================ #include -#include "fosa_long_jump.h" -#include "fosa_configuration_parameters.h" -#include "fosa_threads_and_signals.h" +#include + +#include "fosa.h" #include /** @@ -74,7 +74,7 @@ */ static int handler_installed=0; -static frsh_thread_id_t handler_tid; +static fosa_thread_id_t handler_tid; /** * fosa_long_jump_save_context @@ -157,16 +157,16 @@ int fosa_long_jump_was_performed void * fosa_long_jump_handler (void * arg) { - frsh_signal_t set[1]; - frsh_signal_t sig; - frsh_signal_info_t siginfo; + fosa_signal_t set[1]; + fosa_signal_t sig; + fosa_signal_info_t siginfo; fosa_long_jump_context_t *info; // initialize signal handling set[0]=FOSA_LONG_JUMP_SIGNAL; if (fosa_set_accepted_signals(set, 1) !=0) { - printf("FRSH_ERR_INTERNAL_ERROR, Error setting the signal mask\n"); + printf("FOSA_ERR_INTERNAL_ERROR, Error setting the signal mask\n"); exit(1); } @@ -174,7 +174,7 @@ void * fosa_long_jump_handler (void * arg) { while (1) { // Wait for a budget overrun signal if ((fosa_signal_wait(set, 1, &sig, &siginfo)) == -1) { - printf("FRSH_ERR_INTERNAL_ERROR, signal wait in long jump handler\n"); + printf("FOSA_ERR_INTERNAL_ERROR, signal wait in long jump handler\n"); exit(1); } // Restore thread's context @@ -228,9 +228,9 @@ void * fosa_long_jump_handler (void * arg) { * implementation and dependant applications */ int fosa_long_jump_install_handler -(frsh_signal_t *signal, frsh_thread_id_t *handler) +(fosa_signal_t *signal, fosa_thread_id_t *handler) { - frsh_thread_attr_t attr; + fosa_thread_attr_t attr; int err; if (!handler_installed) { @@ -242,7 +242,7 @@ int fosa_long_jump_install_handler ////////////////////////////////////////////////// // Create the thread attributes object - err=frsh_thread_attr_init (&attr); + err=fosa_thread_attr_init (&attr); if (err != 0) { printf("Error while initializing the attributes\n"); return err; @@ -264,7 +264,7 @@ int fosa_long_jump_install_handler } // destroy the thread attributes object - err=frsh_thread_attr_destroy (&attr); + err=fosa_thread_attr_destroy (&attr); if (err != 0) { printf("Error while destroying the attributes\n"); return err;