X-Git-Url: http://rtime.felk.cvut.cz/gitweb/rtems-pluggable-edf.git/blobdiff_plain/641f61585bf5b33b1b77ad5439b7718ab56e106b..05659dda402df3fafecdf12d258206ea3d79a269:/src/edf/edf_types.h diff --git a/src/edf/edf_types.h b/src/edf/edf_types.h index e30080e..edb959f 100644 --- a/src/edf/edf_types.h +++ b/src/edf/edf_types.h @@ -12,7 +12,21 @@ extern "C" { typedef uint32_t Deadline_Control; -#define ABS_DEADLINE_MAXIMUM 0xffffffff +#define EDF_BYTES_FOR_TIME 4 // It is uint32_t +//#define EDF_TIME_RANGE 0xffffffff + +#define EDF_ABS_DEADLINE_MAX ((1 << (EDF_BYTES_FOR_TIME*4)) - 1) +#define EDF_PRIORITY_MAX 255 + +/** + * The scheduler has two separete policies for for tasks using deadlines + * tasks using priorities. The priority driven tasks are always scheduled as less + * important than the deadline driven ones. + * We can distinguish them by looking at the MSB of their priority. Priority diven + * have 1 and deadline driven have 0. + */ +#define EDF_HYBRID_MASK (1 << (EDF_BYTES_FOR_TIME*8 - 1)) //This is MSB + typedef enum node_color_struct { N_RED, N_BLACK } Node_Color; typedef Thread_Control EDF_Node;