]> rtime.felk.cvut.cz Git - frescor/fosa.git/blobdiff - src_marte/fosa_long_jump.c
Migrating FOSA trunk to d-ac2v2. Phase 1 moving FRSH-FOSA to FOSA
[frescor/fosa.git] / src_marte / fosa_long_jump.c
index 417c94ab6867a7d03d23148cebaa8aa9be4f65ac..7a29265be35379a8a7703dbbbc43b936b7a90637 100644 (file)
@@ -64,9 +64,9 @@
 //================================================
 
 #include <stdio.h>
-#include "fosa_long_jump.h"
-#include "fosa_configuration_parameters.h"
-#include "fosa_threads_and_signals.h"
+#include <stdlib.h>
+
+#include "fosa.h"
 #include <marte_non_local_jmp.h>
 
 /**
@@ -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;