aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-02-03 00:23:32 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-02-03 00:23:32 -0500
commit526afdfb333ca29170fd210b08860ac2a4c141ed (patch)
treea5d1d271da8d59bfa1055d20247621c253efe02f /src
parent7c5e0f1834595a83053ffa7cad1a1947a2490b60 (diff)
rip out old junk
Diffstat (limited to 'src')
-rw-r--r--src/adaptive.c48
-rw-r--r--src/edf-hsb.c48
-rw-r--r--src/litmus.c37
-rw-r--r--src/sched_trace.c1
-rw-r--r--src/syscalls.c7
5 files changed, 0 insertions, 141 deletions
diff --git a/src/adaptive.c b/src/adaptive.c
deleted file mode 100644
index 6a7d7a2..0000000
--- a/src/adaptive.c
+++ /dev/null
@@ -1,48 +0,0 @@
1#include <sys/types.h>
2#include <unistd.h>
3
4#include "litmus.h"
5#include "internal.h"
6#include "syscalls.h"
7
8#include "adaptive.h"
9
10#define __NR_set_service_levels 346
11#define __NR_get_cur_service_level 347
12
13
14
15int set_service_levels(pid_t pid,
16 unsigned int nr_levels,
17 service_level_t* levels)
18{
19 return syscall(__NR_set_service_levels, pid, nr_levels, levels);
20}
21
22
23int get_cur_service_level(void)
24{
25 return syscall(__NR_get_cur_service_level);
26}
27
28
29struct adaptive_param {
30 unsigned int no_levels;
31 service_level_t* levels;
32};
33
34int setup_adaptive(int pid, struct adaptive_param* arg)
35{
36 return set_service_levels(pid, arg->no_levels, arg->levels);
37}
38
39int create_adaptive_rt_task(rt_fn_t rt_prog, void *arg,
40 unsigned int no_levels, service_level_t* levels)
41{
42 struct adaptive_param p;
43 p.no_levels = no_levels;
44 p.levels = levels;
45 return __launch_rt_task(rt_prog, arg,
46 (rt_setup_fn_t) setup_adaptive, &p);
47}
48
diff --git a/src/edf-hsb.c b/src/edf-hsb.c
deleted file mode 100644
index 9ace2ca..0000000
--- a/src/edf-hsb.c
+++ /dev/null
@@ -1,48 +0,0 @@
1#include "litmus.h"
2#include "edf-hsb.h"
3
4
5typedef enum {
6 EDF_HSB_SET_HRT,
7 EDF_HSB_GET_HRT,
8 EDF_HSB_CREATE_BE
9} edf_hsb_setup_cmds_t;
10
11typedef struct {
12 int cpu;
13 unsigned int wcet;
14 unsigned int period;
15} setup_hrt_param_t;
16
17typedef struct {
18 unsigned int wcet;
19 unsigned int period;
20} create_be_param_t;
21
22int set_hrt(int cpu, unsigned int wcet, unsigned int period)
23{
24 setup_hrt_param_t param;
25 param.cpu = cpu;
26 param.wcet = wcet;
27 param.period = period;
28 return scheduler_setup(EDF_HSB_SET_HRT, &param);
29}
30
31int get_hrt(int cpu, unsigned int *wcet, unsigned int *period)
32{
33 setup_hrt_param_t param;
34 int ret;
35 param.cpu = cpu;
36 ret = scheduler_setup(EDF_HSB_GET_HRT, &param);
37 *wcet = param.wcet;
38 *period = param.period;
39 return ret;
40}
41
42int create_be(unsigned int wcet, unsigned int period)
43{
44 create_be_param_t param;
45 param.wcet = wcet;
46 param.period = period;
47 return scheduler_setup(EDF_HSB_CREATE_BE, &param);
48}
diff --git a/src/litmus.c b/src/litmus.c
index cc23263..8f5dfe8 100644
--- a/src/litmus.c
+++ b/src/litmus.c
@@ -8,43 +8,6 @@
8#include "litmus.h" 8#include "litmus.h"
9#include "internal.h" 9#include "internal.h"
10 10
11const char* get_scheduler_name(spolicy scheduler)
12{
13 const char* name;
14
15 switch (scheduler){
16 case SCHED_LINUX :
17 name = "Linux";
18 break;
19 case SCHED_PFAIR:
20 name = "Pfair";
21 break;
22 case SCHED_PART_EDF:
23 name = "Partioned EDF";
24 break;
25 case SCHED_GLOBAL_EDF:
26 name = "Global EDF";
27 break;
28 case SCHED_EDF_HSB:
29 name = "EDF-HSB";
30 break;
31 case SCHED_GSN_EDF:
32 name = "GSN-EDF";
33 break;
34 case SCHED_PSN_EDF:
35 name = "PSN-EDF";
36 break;
37 case SCHED_ADAPTIVE:
38 name = "ADAPTIVE";
39 break;
40 default:
41 name = "Unkown";
42 break;
43 }
44 return name;
45}
46
47
48void show_rt_param(rt_param_t* tp) 11void show_rt_param(rt_param_t* tp)
49{ 12{
50 printf("rt params:\n\t" 13 printf("rt params:\n\t"
diff --git a/src/sched_trace.c b/src/sched_trace.c
index 18969bd..c3a603b 100644
--- a/src/sched_trace.c
+++ b/src/sched_trace.c
@@ -8,7 +8,6 @@
8#include <unistd.h> 8#include <unistd.h>
9 9
10#include "litmus.h" 10#include "litmus.h"
11#include "adaptive.h"
12#include "sched_trace.h" 11#include "sched_trace.h"
13 12
14 13
diff --git a/src/syscalls.c b/src/syscalls.c
index 3b2f76c..0924818 100644
--- a/src/syscalls.c
+++ b/src/syscalls.c
@@ -41,12 +41,9 @@ struct np_flag;
41 41
42_syscall0(pid_t, gettid); 42_syscall0(pid_t, gettid);
43 43
44_syscall0(spolicy, sched_getpolicy);
45_syscall1(int, set_rt_mode, int, arg1);
46_syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1); 44_syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1);
47_syscall2(int, get_rt_task_param, pid_t, pid, rt_param_t*, arg1); 45_syscall2(int, get_rt_task_param, pid_t, pid, rt_param_t*, arg1);
48_syscall0(int, sleep_next_period); 46_syscall0(int, sleep_next_period);
49_syscall2(int, scheduler_setup, int, cmd, void*, param);
50_syscall1(int, register_np_flag, struct np_flag*, flag); 47_syscall1(int, register_np_flag, struct np_flag*, flag);
51_syscall0(int, signal_exit_np); 48_syscall0(int, signal_exit_np);
52 49
@@ -58,10 +55,6 @@ _syscall1(int, pi_up, int, od);
58_syscall1(int, srp_down, int, od); 55_syscall1(int, srp_down, int, od);
59_syscall1(int, srp_up, int, od); 56_syscall1(int, srp_up, int, od);
60_syscall1(int, reg_task_srp_sem, int, od); 57_syscall1(int, reg_task_srp_sem, int, od);
61
62_syscall1(int, get_job_no, unsigned int*, job_no); 58_syscall1(int, get_job_no, unsigned int*, job_no);
63_syscall1(int, wait_for_job_release, unsigned int, job_no); 59_syscall1(int, wait_for_job_release, unsigned int, job_no);
64
65_syscall1(int, start_wcs, int, od);
66_syscall1(int, reg_ics_cb, struct ics_cb*, ics_cb);
67_syscall1(int, task_mode, int, target_mode); 60_syscall1(int, task_mode, int, target_mode);