]> rtime.felk.cvut.cz Git - rtems-pluggable-edf.git/blob - src/edf/rbtree.h
Scheduler modified in order to have an extention of CBS.
[rtems-pluggable-edf.git] / src / edf / rbtree.h
1 #ifndef __RBTREE_h
2 #define __RBTREE_h
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include "edf_types.h"
9 #include <stdint.h>
10
11 #include <rtems/shell.h>
12         
13 // This struct will be embedded into the Thread_Control control 
14 // as scheduler_info 
15 typedef struct RBT_node_struct {
16         Deadline_Control abs_deadline;  
17         Deadline_Control rel_deadline;  
18         EDF_Node  *left;
19         EDF_Node  *right;
20         EDF_Node  *parent;
21         Node_Color       color;
22         EDF_Chain_Control *ready_chain;
23         uint8_t is_enqueued;
24         uint32_t cmp_time; 
25         rtems_id timer_id;
26 } RBT_Node;
27
28 void _RBT_Insert(EDF_Chain_Control *chain,EDF_Node *node);
29 void  _RBT_Extract(EDF_Chain_Control *chain,EDF_Node *node);
30 EDF_Node* _RBT_Search(EDF_Chain_Control *chain,Deadline_Control absdeadline);
31 int _RBT_Has_only_one_node(EDF_Chain_Control *chain);
32
33
34 #ifdef __cplusplus
35 }
36 #endif
37
38 #endif /* __RBTREE_h */