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()
*
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);
/**
#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"
}
+/**
+ * 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()
*