* arg. A pointer to this new created area will be passed to the
* primitive operation init() in its arg parameter.
*
+ * This function must be called before any other function in this
+ * header file.
+ *
+ * In addition it must be called at a priority level no greater than
+ * the priority at which the scheduler operations execute. This
+ * priority is defined as the maximum SCHED_FIFO priority in the
+ * system minus the configuration parameter FOSA_ADS_SCHEDULER_PRIO_DIFF.
+ *
* Returns 0 if successful; otherwise it returns an error code:
* EINVAL: The value of scheduler_ops was invalid
* EAGAIN: The system lacks enough resources to create the scheduler
*
* Returns 0 if successful; otherwise it returns an error code:
* ENOMEM: There is insufficient memory to add this action
- * EPOLICY: The thread specified by thread has its appscheduled
- * attribute set to false,
* EINVAL: The value specified by sched_actions is invalid
*
* Alternatively, in case of error the implementation is allowed to
* succeed, it has to be called from a primitive operation of a
* scheduler.
*
+ * The size of the array is specified by argument size.
+ *
* Returns 0 if successful; otherwise it returns an error code:
* EPOLICY: The function has not been called from a scheduler
* primitive operation
* 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 fosa_ads_set_handled_signal_set(frsh_signal_t set[], int size);
/**
* ADS
*********/
-#define FOSA_ADS_ACTIONS_T_OPAQUE posix_appsched_actions_t
+typedef struct {
+ posix_appsched_actions_t actions;
+ struct timespec * timeout_ptr;
+ struct timespec timeout;
+ bool rejected;
+ bool suspended;
+ bool activated;
+} fosa_ads_actions_internal_t;
+
+
+#define FOSA_ADS_ACTIONS_T_OPAQUE fosa_ads_actions_internal_t
+
+
#endif
void (*explicit_call_with_data) (void * sched_data,
frsh_thread_id_t thread,
const void * msg, size_t msg_size,
- void **reply, size_t *reply_size,
+ void *reply, size_t *reply_size,
fosa_ads_actions_t * actions,
struct timespec *current_time);
void (*notification_for_thread) (void * sched_data,