]> rtime.felk.cvut.cz Git - rtems-pluggable-edf.git/blobdiff - src/edf/edf_types.h
EDF extended by Deadline inversion handling
[rtems-pluggable-edf.git] / src / edf / edf_types.h
index e30080eebba16790ab0e08cb17a01b42548ddd6a..edb959fcd4687beef36cee56e67e76f13435d409 100644 (file)
@@ -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;