diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-02-03 00:23:32 -0500 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-02-03 00:23:32 -0500 |
| commit | 526afdfb333ca29170fd210b08860ac2a4c141ed (patch) | |
| tree | a5d1d271da8d59bfa1055d20247621c253efe02f /include | |
| parent | 7c5e0f1834595a83053ffa7cad1a1947a2490b60 (diff) | |
rip out old junk
Diffstat (limited to 'include')
| -rw-r--r-- | include/adaptive.h | 38 | ||||
| -rw-r--r-- | include/edf-hsb.h | 10 | ||||
| -rw-r--r-- | include/litmus.h | 57 | ||||
| -rw-r--r-- | include/sched_trace.h | 21 |
4 files changed, 0 insertions, 126 deletions
diff --git a/include/adaptive.h b/include/adaptive.h deleted file mode 100644 index 360b13e..0000000 --- a/include/adaptive.h +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | #ifndef ADAPTIVE_H | ||
| 2 | #define ADAPTIVE_H | ||
| 3 | |||
| 4 | #define FP_SHIFT 10 | ||
| 5 | typedef struct | ||
| 6 | { | ||
| 7 | long val; | ||
| 8 | } fp_t; | ||
| 9 | |||
| 10 | static inline fp_t f2fp(double f) | ||
| 11 | { | ||
| 12 | return (fp_t) {f * (1 << FP_SHIFT)}; | ||
| 13 | } | ||
| 14 | |||
| 15 | static inline double fp2f(fp_t f) | ||
| 16 | { | ||
| 17 | return ((double) f.val) / (1 << FP_SHIFT); | ||
| 18 | } | ||
| 19 | |||
| 20 | |||
| 21 | #define MAX_SERVICE_LEVELS 10 | ||
| 22 | typedef struct { | ||
| 23 | fp_t weight; | ||
| 24 | unsigned long period; | ||
| 25 | fp_t value; | ||
| 26 | } service_level_t; | ||
| 27 | |||
| 28 | int set_service_levels(pid_t pid, | ||
| 29 | unsigned int nr_levels, | ||
| 30 | service_level_t* levels); | ||
| 31 | |||
| 32 | int get_cur_service_level(void); | ||
| 33 | |||
| 34 | int create_adaptive_rt_task(rt_fn_t rt_prog, void *arg, | ||
| 35 | unsigned int no_levels, service_level_t* levels); | ||
| 36 | |||
| 37 | |||
| 38 | #endif | ||
diff --git a/include/edf-hsb.h b/include/edf-hsb.h deleted file mode 100644 index 0ac3d4f..0000000 --- a/include/edf-hsb.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #ifndef EDF_HSB_H | ||
| 2 | #define EDF_HSB_H | ||
| 3 | |||
| 4 | |||
| 5 | int set_hrt(int cpu, unsigned int wcet, unsigned int period); | ||
| 6 | int get_hrt(int cpu, unsigned int *wcet, unsigned int *period); | ||
| 7 | int create_be(unsigned int wcet, unsigned int period); | ||
| 8 | |||
| 9 | |||
| 10 | #endif | ||
diff --git a/include/litmus.h b/include/litmus.h index c3cd51d..8918ae9 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
| @@ -6,20 +6,6 @@ | |||
| 6 | /* A real-time program. */ | 6 | /* A real-time program. */ |
| 7 | typedef int (*rt_fn_t)(void*); | 7 | typedef int (*rt_fn_t)(void*); |
| 8 | 8 | ||
| 9 | /* Litmus scheduling policies */ | ||
| 10 | typedef enum { | ||
| 11 | SCHED_LINUX = 0, | ||
| 12 | SCHED_PFAIR = 1, | ||
| 13 | SCHED_PART_EDF = 3, | ||
| 14 | SCHED_GLOBAL_EDF = 5, | ||
| 15 | SCHED_PFAIR_DESYNC = 6, | ||
| 16 | SCHED_GLOBAL_EDF_NP = 7, | ||
| 17 | SCHED_EDF_HSB = 9, | ||
| 18 | SCHED_GSN_EDF = 10, | ||
| 19 | SCHED_PSN_EDF = 11, | ||
| 20 | SCHED_ADAPTIVE = 12, | ||
| 21 | } spolicy; | ||
| 22 | |||
| 23 | /* different types of clients */ | 9 | /* different types of clients */ |
| 24 | typedef enum { | 10 | typedef enum { |
| 25 | RT_CLASS_HARD, | 11 | RT_CLASS_HARD, |
| @@ -48,12 +34,6 @@ typedef int pid_t; /* PID of a task */ | |||
| 48 | /* obtain the PID of a thread */ | 34 | /* obtain the PID of a thread */ |
| 49 | pid_t gettid(void); | 35 | pid_t gettid(void); |
| 50 | 36 | ||
| 51 | /* scheduler modes */ | ||
| 52 | #define MODE_NON_RT 0 | ||
| 53 | #define MODE_RT_RUN 1 | ||
| 54 | |||
| 55 | spolicy sched_getpolicy(void); | ||
| 56 | int set_rt_mode(int mode); | ||
| 57 | int set_rt_task_param(pid_t pid, rt_param_t* param); | 37 | int set_rt_task_param(pid_t pid, rt_param_t* param); |
| 58 | int get_rt_task_param(pid_t pid, rt_param_t* param); | 38 | int get_rt_task_param(pid_t pid, rt_param_t* param); |
| 59 | 39 | ||
| @@ -66,18 +46,10 @@ int sporadic_task(unsigned long exec_cost, unsigned long period, | |||
| 66 | #define sporadic_partitioned(e, p, cpu) \ | 46 | #define sporadic_partitioned(e, p, cpu) \ |
| 67 | sporadic_task(e, p, cpu, RT_CLASS_SOFT) | 47 | sporadic_task(e, p, cpu, RT_CLASS_SOFT) |
| 68 | 48 | ||
| 69 | |||
| 70 | /* deprecated */ | ||
| 71 | enum { | ||
| 72 | LITMUS_RESERVED_RANGE = 1024, | ||
| 73 | } SCHED_SETUP_CMD; | ||
| 74 | int scheduler_setup(int cmd, void* param); | ||
| 75 | |||
| 76 | /* file descriptor attached shared objects support */ | 49 | /* file descriptor attached shared objects support */ |
| 77 | typedef enum { | 50 | typedef enum { |
| 78 | PI_SEM = 0, | 51 | PI_SEM = 0, |
| 79 | SRP_SEM = 1, | 52 | SRP_SEM = 1, |
| 80 | ICS_ID = 2, | ||
| 81 | } obj_type_t; | 53 | } obj_type_t; |
| 82 | 54 | ||
| 83 | int od_openx(int fd, obj_type_t type, int obj_id, void* config); | 55 | int od_openx(int fd, obj_type_t type, int obj_id, void* config); |
| @@ -100,34 +72,6 @@ int get_job_no(unsigned int* job_no); | |||
| 100 | int wait_for_job_release(unsigned int job_no); | 72 | int wait_for_job_release(unsigned int job_no); |
| 101 | int sleep_next_period(void); | 73 | int sleep_next_period(void); |
| 102 | 74 | ||
| 103 | /* interruptible critical section support */ | ||
| 104 | #define MAX_ICS_NESTING 16 | ||
| 105 | #define ICS_STACK_EMPTY (-1) | ||
| 106 | |||
| 107 | struct ics_descriptor { | ||
| 108 | /* ICS id, only read by kernel */ | ||
| 109 | int id; | ||
| 110 | /* rollback program counter, only read by kernel */ | ||
| 111 | void* pc; | ||
| 112 | /* rollback stack pointer, not used by kernel */ | ||
| 113 | void* sp; | ||
| 114 | /* retry flag, not used by kernel */ | ||
| 115 | int* retry; | ||
| 116 | }; | ||
| 117 | |||
| 118 | /* ICS control block */ | ||
| 119 | struct ics_cb { | ||
| 120 | /* Points to the top-most valid entry. | ||
| 121 | * -1 indicates an empty stack. | ||
| 122 | * Read and written by kernel. | ||
| 123 | */ | ||
| 124 | int top; | ||
| 125 | struct ics_descriptor ics_stack[MAX_ICS_NESTING]; | ||
| 126 | }; | ||
| 127 | |||
| 128 | int reg_ics_cb(struct ics_cb* ics_cb); | ||
| 129 | int start_wcs(int od); | ||
| 130 | |||
| 131 | /* library functions */ | 75 | /* library functions */ |
| 132 | int init_litmus(void); | 76 | int init_litmus(void); |
| 133 | int init_rt_thread(void); | 77 | int init_rt_thread(void); |
| @@ -144,7 +88,6 @@ enum rt_task_mode_t { | |||
| 144 | }; | 88 | }; |
| 145 | int task_mode(int target_mode); | 89 | int task_mode(int target_mode); |
| 146 | 90 | ||
| 147 | const char* get_scheduler_name(spolicy scheduler); | ||
| 148 | void show_rt_param(rt_param_t* tp); | 91 | void show_rt_param(rt_param_t* tp); |
| 149 | task_class_t str2class(const char* str); | 92 | task_class_t str2class(const char* str); |
| 150 | 93 | ||
diff --git a/include/sched_trace.h b/include/sched_trace.h index 1427107..5d2ddb3 100644 --- a/include/sched_trace.h +++ b/include/sched_trace.h | |||
| @@ -17,9 +17,6 @@ typedef enum { | |||
| 17 | ST_JOB_COMPLETION = 6, | 17 | ST_JOB_COMPLETION = 6, |
| 18 | ST_CAPACITY_RELEASE = 7, | 18 | ST_CAPACITY_RELEASE = 7, |
| 19 | ST_CAPACITY_ALLOCATION = 8, | 19 | ST_CAPACITY_ALLOCATION = 8, |
| 20 | ST_SERVICE_LEVEL_CHANGE = 9, | ||
| 21 | ST_WEIGHT_ERROR = 10, | ||
| 22 | |||
| 23 | 20 | ||
| 24 | ST_MAX | 21 | ST_MAX |
| 25 | } trace_type_t; | 22 | } trace_type_t; |
| @@ -96,24 +93,6 @@ typedef struct { | |||
| 96 | pid_t donor; | 93 | pid_t donor; |
| 97 | } cap_allocation_record_t; | 94 | } cap_allocation_record_t; |
| 98 | 95 | ||
| 99 | typedef struct { | ||
| 100 | trace_header_t header; | ||
| 101 | task_info_t task; | ||
| 102 | unsigned int from:16; | ||
| 103 | unsigned int to:16; | ||
| 104 | service_level_t new_level; | ||
| 105 | service_level_t old_level; | ||
| 106 | } service_level_change_record_t; | ||
| 107 | |||
| 108 | typedef struct { | ||
| 109 | trace_header_t header; | ||
| 110 | pid_t task; | ||
| 111 | fp_t estimate; | ||
| 112 | fp_t actual; | ||
| 113 | } weight_error_record_t; | ||
| 114 | |||
| 115 | |||
| 116 | |||
| 117 | 96 | ||
| 118 | 97 | ||
| 119 | 98 | ||
