]> rtime.felk.cvut.cz Git - frescor/fosa.git/commitdiff
Moving fosa_signal_queue_scheduler() from threads_and_signals.h to
authortelleriam <telleriam@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Thu, 14 Jun 2007 13:00:38 +0000 (13:00 +0000)
committertelleriam <telleriam@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Thu, 14 Jun 2007 13:00:38 +0000 (13:00 +0000)
app_def_sched.h and implement it in the app_def_sched.c file in MaRTE.
For MaRTE-OS it is a direct call to fosa_signal_queue().

git-svn-id: http://www.frescor.org/private/svn/frescor/fosa/trunk@481 35b4ef3e-fd22-0410-ab77-dab3279adceb

include/fosa_app_def_sched.h
include/fosa_threads_and_signals.h
src_marte/fosa_app_def_sched.c

index 893efa369ff80f017ce36f6bdb6e8148518ee5f3..80f0c5beafdeecc5ed73b383bafa6c8159e331aa 100644 (file)
@@ -560,6 +560,39 @@ int fosa_adsactions_add_thread_notification(
 int fosa_ads_set_handled_signal_set(frsh_signal_t set[], int size);
 
 
+/**
+ * fosa_signal_queue_scheduler()
+ *
+ * Queue a signal destinated to the scheduler
+ *
+ * This is a special case of fosa_signal_queue() in which the
+ * destinator is the scheduler itself.  It is needed by the service
+ * thread to notify the results to the scheduler.
+ *
+ * The problem with this case is that, depending on the implementation,
+ * this call would be translated to a true signal or to a scheduler
+ * notification message.
+ *
+ * Besides for the scheduler we don't have always a destinator
+ * thread_id needed in frsh_signal_queue for OSE.
+ *
+ * So the fosa implementation will solve this issue internally.
+ * 
+ * Returns 0 if successful; otherwise it returns an error code:
+ *     FOSA_EINVAL: the signal specified by signal is not
+ *              between FOSA_SIGNAL_MIN and FOSA_SIGNAL_MAX
+ *
+ *     FOSA_EAGAIN: no resources are available to queue the signal; the
+ *             maximum number of queued signals has been reached, or a
+ *             systemwide resource limit has been exceeded
+ *
+ * Alternatively, in case of error the implementation is allowed to
+ * 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);
+
+
 /**
  * fosa_ads_invoke_withdata()
  *
index c97c61b460e1098ecca709fc1f568f309c259822..bc56e03fad117453c1932a6cb3b72a866b3226a5 100644 (file)
@@ -377,37 +377,6 @@ int fosa_signal_queue
         frsh_thread_id_t receiver);
 
 
-/**
- * fosa_signal_queue_scheduler()
- *
- * Queue a signal destinated to the scheduler
- *
- * This is a special case of fosa_signal_queue() in which the
- * destinator is the scheduler itself.  It is needed by the service
- * thread to notify the results to the scheduler.
- *
- * The problem with this case is that, depending on the implementation,
- * this call would be translated to a true signal or to a scheduler
- * notification message.
- *
- * Besides for the scheduler we don't have always a destinator
- * thread_id needed in frsh_signal_queue for OSE.
- *
- * So the fosa implementation will solve this issue internally.
- * 
- * Returns 0 if successful; otherwise it returns an error code:
- *     FOSA_EINVAL: the signal specified by signal is not
- *              between FOSA_SIGNAL_MIN and FOSA_SIGNAL_MAX
- *
- *     FOSA_EAGAIN: no resources are available to queue the signal; the
- *             maximum number of queued signals has been reached, or a
- *             systemwide resource limit has been exceeded
- *
- * Alternatively, in case of error the implementation is allowed to
- * 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);
 
 
 /**
index 43ca2eb973ecb5eba0843475a3bc1a4b5cb66a36..920d76a1036fb8de533af29923573a24d7ee720e 100644 (file)
@@ -54,6 +54,7 @@
 
 #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"
 
@@ -1039,6 +1040,49 @@ int fosa_ads_set_handled_signal_set(frsh_signal_t set[], int size)
 }
 
 
+/**
+ * fosa_signal_queue_scheduler()
+ *
+ * Queue a signal destinated to the scheduler
+ *
+ * This is a special case of fosa_signal_queue() in which the
+ * destinator is the scheduler itself.  It is needed by the service
+ * thread to notify the results to the scheduler.
+ *
+ * The problem with this case is that, depending on the implementation,
+ * this call would be translated to a true signal or to a scheduler
+ * notification message.
+ *
+ * Besides for the scheduler we don't have always a destinator
+ * thread_id needed in frsh_signal_queue for OSE.
+ *
+ * So the fosa implementation will solve this issue internally.
+ * 
+ * Returns 0 if successful; otherwise it returns an error code:
+ *     FOSA_EINVAL: the signal specified by signal is not
+ *              between FOSA_SIGNAL_MIN and FOSA_SIGNAL_MAX
+ *
+ *     FOSA_EAGAIN: no resources are available to queue the signal; the
+ *             maximum number of queued signals has been reached, or a
+ *             systemwide resource limit has been exceeded
+ *
+ * Alternatively, in case of error the implementation is allowed to
+ * 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)
+{
+    /* 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 */
+    
+
+    return fosa_signal_queue(signal, info, receiver);
+}
+
+
 /**
  * fosa_ads_invoke_withdata()
  *