212,25 → 212,33 |
// range 1..2**32-1 |
|
|
// |
// Types for the shared objects module |
// |
/// |
/// Types for the shared objects module |
/// |
|
// Shared object identifier (null character terminated string) |
/// Shared object identifier (null character terminated string) |
typedef char * fsf_shared_obj_id_t; |
|
// Shared object handle (opaque type) |
/// Shared object handle (opaque type) |
typedef FSF_SHARED_OBJ_HANDLE_T_OPAQUE fsf_shared_obj_handle_t; |
|
// Critical section data |
/// Critical section data |
typedef struct { |
/// handle of shared object |
fsf_shared_obj_handle_t obj_handle; |
struct timespec wcet; //Execution time |
/// Execution time of critical section |
struct timespec wcet; |
} fsf_critical_section_data_t; |
|
// List of critical sections |
/** |
This data type is used to specify the critical sections for the contract and is a part of shared object module. |
|
*/ |
/// List of critical sections |
typedef struct { |
/// lenght of the array |
int size; // = 0 |
/// array of critical sections |
fsf_critical_section_data_t |
section[FSF_MAX_N_CRITICAL_SECTIONS]; |
} fsf_critical_sections_t; |
239,47 → 247,79 |
// |
// Types for the hierarchical module |
// |
/** |
This data type is used for defining scheduling polices in a contract |
or the behaviour of a task. |
|
// Scheduling policies |
It can have the following values: |
|
- FSF_EDF: EDF policy |
|
- FSF_RR: Round robin policy |
|
- FSF_TABLE_DRIVEN: Table driven policy |
|
- FSF_NONE: Defines that the contract can accept one thread |
|
*/ |
/// Scheduling policies |
typedef enum {FSF_FP, FSF_EDF, FSF_TABLE_DRIVEN, FSF_RR, FSF_NONE} |
fsf_sched_policy_t; |
|
// Scheduling policy and parameters |
/** |
This data type is used to specify the scheduling policy and parameters for each task in the hierarchical module. |
|
*/ |
/// Real time parameters |
typedef struct { |
/// The params member specify the scheduling policy |
fsf_sched_policy_t policy; |
/// The params member is a pointer to one of the |
/// following: |
/// FP: int (priority) |
/// EDF: struct timespec (deadline) |
/// RR: none |
/// TABLE_DRIVEN : struct fsf_table_driven_params_t |
void * params; |
|
|
} fsf_sched_params_t; |
// The params member is a pointer to one of the |
// following: |
// FP: int (priority) |
// EDF: struct timespec (deadline) |
// RR: none |
// TABLE_DRIVEN : struct fsf_table_driven_params_t |
|
/** |
This data type is used to specify a target window of a task. |
|
//Scheduling parameters for the table-driven policy |
//list of target windows |
*/ |
///Target window for the table-driven scheduler |
typedef struct fsf_target_window { |
/// The start time of the target window |
struct timespec start; |
/// The end time of the target window |
struct timespec end; |
/// The computation time of the task in the target window |
struct timespec comp_time; |
} fsf_target_window; |
|
/** |
This data type is used to specify the window of activation for each task in the table driven scheduler. |
|
*/ |
/// Real time parameters for table drivern |
typedef struct { |
/// The params indicates the lenght of the array |
int size; |
/// The params rappresent the array of target windows |
fsf_target_window table[FSF_MAX_N_TARGET_WINDOWS]; |
} fsf_table_driven_params_t; |
|
|
//Initialization information for a scheduling policy |
///Initialization information for a scheduling policy |
/// It shall be one of the following: |
/// FP: none |
/// EDF: none |
/// RR: struct timespec (slice duration) |
/// TABLE_DRIVEN : struct timespec (schedule duration) |
typedef void * fsf_sched_init_info_t; |
|
// It shall be one of the following: |
// FP: none |
// EDF: none |
// RR: struct timespec (slice duration) |
// TABLE_DRIVEN : struct timespec (schedule duration) |
|
// Constant for assigning default values |
#define FSF_DEFAULT_SCHED_POLICY FSF_NONE |
|