12,6 → 12,10 |
//======================================================================= |
// |
|
/** |
\file fsf_basic_types.h |
*/ |
|
#include <time.h> |
#include "fsf_opaque_types.h" |
#include "fsf_configuration_parameters.h" |
27,13 → 31,28 |
// Types for the core module |
// |
|
// Kind of workload expected in servers |
/** |
This data type is used for defining the workload parameter in the |
contract specification functions. |
|
It can have the following values: |
|
- FSF_BOUNDED: The workload generated by the task(s) in the server is bounded |
|
- FSF_INDETERMINATE: The workload generated by the task(s) in the server is indeterminate |
|
- FSF_OVERHEAD: The workload generated by the task(s) in the server is TBD |
|
*/ |
typedef enum {FSF_BOUNDED, FSF_INDETERMINATE, FSF_OVERHEAD} fsf_workload_t; |
|
// Constants for assigning default values |
/// Default value for the workload parameter |
#define FSF_DEFAULT_WORKLOAD FSF_INDETERMINATE |
|
#define FSF_DEFAULT_WORKLOAD FSF_INDETERMINATE |
/// Default value for the parameter d_equal_t in the contract initialization |
#define FSF_DEFAULT_D_EQUALS_T false |
|
// Default value for the server relative deadline |
#define FSF_DEFAULT_DEADLINE {0,0} //struct timespec |
|
// Constants for omitting the assignment of values |
40,11 → 59,18 |
// to specific arguments in calls to |
// initialization functions |
|
/// A null deadline |
#define FSF_NULL_DEADLINE (struct timespec *)NULL |
|
/// A null signal |
#define FSF_NULL_SIGNAL 0 |
|
/** |
Possible values returned by fsf_get_renegotiation_status |
This data type is used to express the list of possible values |
returned by fsf_get_renegotiation_status. It can assume the |
following values: |
|
|
*/ |
typedef enum {FSF_IN_PROGRESS, |
FSF_REJECTED, |
102,38 → 128,76 |
// Types for the spare capacity module |
// |
|
// Granularity of spare capacity requirements |
/** |
Granularity of spare capacity requirements. This data type is used |
in the spare capacity module to specify the kind of granularity in |
spare capacity allocation when creating a new contract. |
|
A variable of this type can assume the following values: |
|
- FSF_CONTINUOUS the utilization assigned to the server by the |
spare capacity module can assume any value between the minimum |
(Cmin / Tmax) and the maximum (Cmax/Tmin). |
|
- FSF_DISCRETE the utilization assigned to the server can assume |
only values in a discrete set of pairs (C,T) (to be specified |
with a variable of type fsf_utilization_set_t) |
|
*/ |
typedef enum {FSF_CONTINUOUS, FSF_DISCRETE} fsf_granularity_t; |
|
// Utilization (budget and period) value |
/** |
This data type is used in the spare capacity module to specify |
pairs of (budget,period) that can be assigned by the spare capacity |
distribution algorithm to the server. |
respectively. |
*/ |
typedef struct { |
struct timespec budget; // Execution time |
struct timespec period; // Period |
/// server capacity |
struct timespec budget; |
/// server period |
struct timespec period; |
} fsf_utilization_value_t; |
|
//List of utilization values |
|
/** |
This data type is used in the spare capacity module to specify a |
set of possible pairs (C,T) that can be assigned to the server. |
*/ |
typedef struct { |
/// lenght of the array |
int size; // = 0 |
/// array of pairs (C,T) |
fsf_utilization_value_t |
value[FSF_MAX_N_UTILIZATION_VALUES]; |
} fsf_utilization_set_t; |
|
// Constants for assigning default values |
|
/// The defualt granularity |
#define FSF_DEFAULT_GRANULARITY FSF_CONTINUOUS |
|
/// Defaut value for the quality parameter |
#define FSF_DEFAULT_QUALITY 0 |
|
/// Default value for the importance parameter |
#define FSF_DEFAULT_IMPORTANCE 1 |
|
// Constants for omitting the assignment of values to specific |
// arguments in calls to initialization functions |
|
/// Constant for omitting the assignment of values to the |
/// fsf_utilizazion_set_t parameter in call to the contract initialization |
/// functions |
#define FSF_NULL_UTILIZATION_SET \ |
(fsf_utilization_set_t *)NULL |
|
// Constants used in the specification of the spare capacity |
// operations |
/// Maximum value of the quality parameter |
#define FSF_MAX_QUALITY (2**32 -1) |
|
/// Minimum value of the quality parameter |
#define FSF_MIN_QUALITY 0 |
|
/// Maximum value of the importance parameter |
#define FSF_MAX_IMPORTANCE FSF_N_IMPORTANCE_LEVELS |
|
/// Minimum value of the importance parameter |
#define FSF_MIN_IMPORTANCE 1 |
|
|
209,6 → 273,7 |
|
//Initialization information for a scheduling policy |
typedef void * fsf_sched_init_info_t; |
|
// It shall be one of the following: |
// FP: none |
// EDF: none |