22,50 → 22,42 |
|
// Definition of types and constants used in fsf modules |
|
/** |
\file fsf_basic_types.hh Contains the basic types |
|
This file contains the definition of the basec types used in |
the FSF. |
*/ |
|
|
// |
// Types for the core module |
// |
|
/// Kind of workload expected in servers |
// Kind of workload expected in servers |
typedef enum {FSF_BOUNDED, FSF_INDETERMINATE, FSF_OVERHEAD} fsf_workload_t; |
|
/// Constants for assigning default values |
/// @{ |
// Constants for assigning default values |
|
#define FSF_DEFAULT_WORKLOAD FSF_INDETERMINATE |
#define FSF_DEFAULT_D_EQUALS_T false |
#define FSF_DEFAULT_DEADLINE {0,0} //struct timespec |
/// @} |
|
/// Constants for omitting the assignment of values |
/// to specific arguments in calls to |
/// initialization functions |
/// @{ |
// Constants for omitting the assignment of values |
// to specific arguments in calls to |
// initialization functions |
|
#define FSF_NULL_DEADLINE (struct timespec *)NULL |
#define FSF_NULL_SIGNAL 0 |
/// @} |
|
|
// |
// Types for the spare capacity module |
// |
|
/// Granularity of spare capacity requirements |
// Granularity of spare capacity requirements |
typedef enum {FSF_CONTINUOUS, FSF_DISCRETE} fsf_granularity_t; |
|
/// Utilization (budget and period) value |
// Utilization (budget and period) value |
typedef struct { |
struct timespec budget; // Execution time |
struct timespec period; // Period |
} fsf_utilization_value_t; |
|
/// List of utilization values |
//List of utilization values |
typedef struct { |
int size; // = 0 |
fsf_utilization_value_t |
72,15 → 64,14 |
value[FSF_MAX_N_UTILIZATION_VALUES]; |
} fsf_utilization_set_t; |
|
/// Constants for assigning default values |
/// @{ |
// Constants for assigning default values |
#define FSF_DEFAULT_GRANULARITY FSF_CONTINUOUS |
#define FSF_DEFAULT_QUALITY 0 |
#define FSF_DEFAULT_IMPORTANCE 1 |
/// @} |
|
/// Constants for omitting the assignment of values to specific |
/// arguments in calls to initialization functions |
// Constants for omitting the assignment of values to specific |
// arguments in calls to initialization functions |
|
#define FSF_NULL_UTILIZATION_SET \ |
(fsf_utilization_set_t *)NULL |
|
89,7 → 80,7 |
// Types for the implementation specific module |
// |
|
/// Implementation specific preemption level values |
//Implementation specific preemption level values |
typedef unsigned long fsf_preemption_level_t; |
// range 1..2**32-1 |
|
98,19 → 89,19 |
// 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 { |
fsf_shared_obj_handle_t obj_handle; |
struct timespec wcet; //Execution time |
} fsf_critical_section_data_t; |
|
/// List of critical sections |
// List of critical sections |
typedef struct { |
int size; // = 0 |
fsf_critical_section_data_t |
122,23 → 113,23 |
// Types for the hierarchical module |
// |
|
/// Scheduling policies |
typedef enum {FSF_FP, FSF_POSIX, FSF_RM, FSF_EDF, FSF_TABLE_DRIVEN, FSF_NONE} |
// Scheduling policies |
typedef enum {FSF_FP, FSF_EDF, FSF_TABLE_DRIVEN, FSF_NONE, FSF_RM, FSF_POSIX} |
fsf_sched_policy_t; |
|
/// Scheduling policy and parameters |
/// The params member is a pointer to one of the |
/// following: |
/// FP: int (priority) |
/// EDF: struct timespec (deadline) |
/// TABLE_DRIVEN : struct fsf_table_driven_params_t |
// Scheduling policy and parameters |
typedef struct { |
fsf_sched_policy_t policy; |
void * params; |
} fsf_sched_params_t; |
// The params member is a pointer to one of the |
// following: |
// FP: int (priority) |
// EDF: struct timespec (deadline) |
// TABLE_DRIVEN : struct fsf_table_driven_params_t |
|
|
/// Scheduling parameters for the table-driven policy (t.b.d) |
//Scheduling parameters for the table-driven policy (t.b.d) |
typedef struct { |
// list of target windows (t.b.d.) |
// deadline (for the API): end of september |
145,18 → 136,17 |
} fsf_table_driven_params_t; |
|
|
/// Initialization information for a scheduling policy |
/// It shall be one of the following: |
/// FP: none |
/// EDF: none |
/// TABLE_DRIVEN : struct timespec (schedule duration) |
//Initialization information for a scheduling policy |
typedef void * fsf_sched_init_info_t; |
// It shall be one of the following: |
// FP: none |
// EDF: none |
// TABLE_DRIVEN : struct timespec (schedule duration) |
|
|
|
/// Error codes |
/// @{ |
#define FSF_ERR_BASE 0x02003000 |
// Error codes |
#define FSF_ERR_CODES_BASE 0x02003000 |
#define FSF_ERR_TOO_MANY_TASKS 0x02003001 |
#define FSF_ERR_BAD_ARGUMENT 0x02003002 |
#define FSF_ERR_INVALID_SYNCH_OBJ_HANDLE 0x02003003 |
163,7 → 153,7 |
#define FSF_ERR_NO_RENEGOTIATION_REQUESTED 0x02003004 |
#define FSF_ERR_CONTRACT_REJECTED 0x02003005 |
#define FSF_ERR_NOT_SCHEDULED_CALLING_THREAD 0x02003006 |
#define FSF_ERR_UNBOUND 0x02003007 |
#define FSF_ERR_UNBOUND_THREAD 0x02003007 |
#define FSF_ERR_UNKNOWN_APPSCHEDULED_THREAD 0x02003008 |
#define FSF_ERR_NOT_CONTRACTED_SERVER 0x02003009 |
#define FSF_ERR_NOT_SCHEDULED_THREAD 0x0200300A |
175,15 → 165,16 |
#define FSF_ERR_TOO_MANY_SERVERS 0x02003010 |
#define FSF_ERR_INVALID_SCHEDULER_REPLY 0x02003011 |
#define FSF_ERR_TOO_MANY_PENDING_REPLENISHMENTS 0x02003012 |
#define FSF_ERR_SYSTEM_ALREADY_INITIALIZED 0x02003013 |
#define FSF_ERR_SHARED_OBJ_ALREADY_INITIALIZED 0x02003014 |
#define FSF_ERR_SHARED_OBJ_NOT_INITIALIZED 0x02003015 |
#define FSF_ERR_SCHED_POLICY_NOT_COMPATIBLE 0x02003016 |
#define FSF_ERR_MAX 0x02003017 |
|
// WARNING MESSAGE |
#define FSF_WRN_UNSUPPORTED_FEATURE 0x02004006 |
#define FSF_WRN_MODULE_NOT_SUPPORTED 0x02004013 |
///@} |
#define FSF_ERR_CODES_MAX 0x02003013 |
|
#define FSF_WRN_MODULE_NOT_SUPPORTED 0x02004001 |
|
#define FSF_ERR_SYSTEM_ALREADY_INITIALIZED 0x02004002 |
#define FSF_ERR_SHARED_OBJ_ALREADY_INITIALIZED 0x02004003 |
#define FSF_ERR_SHARED_OBJ_NOT_INITIALIZED 0x02004004 |
#define FSF_ERR_SCHED_POLICY_NOT_COMPATIBLE 0x02004005 |
|
#define FSF_ERR_SERVER_WORKLOAD_NOT_COMPATIBLE 0x02004006 //JULIO: Added to support dummy contracts |
//there are other 2 or 3 more for the distributed part |
|
#endif // _FSF_BASIC_TYPES_H_ |