diff options
| author | Glenn Elliott <gelliott@koruna.(none)> | 2010-07-13 13:35:41 -0400 |
|---|---|---|
| committer | Glenn Elliott <gelliott@koruna.(none)> | 2010-07-13 13:35:41 -0400 |
| commit | 92ff5288be6a6e760b8c727965bd7e0c6eda704e (patch) | |
| tree | b6f0727cee03c5b15c280a08b2cc1cc88ab26abf | |
| parent | e9c900fae35e4e4730469e189ff17bf30518346a (diff) | |
Updated liblitmus to support OMLP.wip-omlp-gedf
| -rw-r--r-- | include/litmus.h | 9 | ||||
| -rw-r--r-- | src/syscalls.c | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h index b798c92..d343abc 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
| @@ -50,6 +50,7 @@ int sporadic_task_ns( | |||
| 50 | typedef enum { | 50 | typedef enum { |
| 51 | FMLP_SEM = 0, | 51 | FMLP_SEM = 0, |
| 52 | SRP_SEM = 1, | 52 | SRP_SEM = 1, |
| 53 | OMLP_SEM = 2 | ||
| 53 | } obj_type_t; | 54 | } obj_type_t; |
| 54 | 55 | ||
| 55 | int od_openx(int fd, obj_type_t type, int obj_id, void* config); | 56 | int od_openx(int fd, obj_type_t type, int obj_id, void* config); |
| @@ -68,6 +69,10 @@ int fmlp_up(int od); | |||
| 68 | int srp_down(int od); | 69 | int srp_down(int od); |
| 69 | int srp_up(int od); | 70 | int srp_up(int od); |
| 70 | 71 | ||
| 72 | /* OMLP binary semaphore support */ | ||
| 73 | int omlp_down(int od); | ||
| 74 | int omlp_up(int od); | ||
| 75 | |||
| 71 | /* job control*/ | 76 | /* job control*/ |
| 72 | int get_job_no(unsigned int* job_no); | 77 | int get_job_no(unsigned int* job_no); |
| 73 | int wait_for_job_release(unsigned int job_no); | 78 | int wait_for_job_release(unsigned int job_no); |
| @@ -123,6 +128,10 @@ static inline int open_srp_sem(int fd, int name) | |||
| 123 | return od_open(fd, SRP_SEM, name); | 128 | return od_open(fd, SRP_SEM, name); |
| 124 | } | 129 | } |
| 125 | 130 | ||
| 131 | static inline int open_omlp_sem(int fd, int name) | ||
| 132 | { | ||
| 133 | return od_open(fd, OMLP_SEM, name); | ||
| 134 | } | ||
| 126 | 135 | ||
| 127 | /* syscall overhead measuring */ | 136 | /* syscall overhead measuring */ |
| 128 | int null_call(cycles_t *timestamp); | 137 | int null_call(cycles_t *timestamp); |
diff --git a/src/syscalls.c b/src/syscalls.c index 77a6277..7309550 100644 --- a/src/syscalls.c +++ b/src/syscalls.c | |||
| @@ -61,6 +61,16 @@ int srp_up(int od) | |||
| 61 | return syscall(__NR_srp_up, od); | 61 | return syscall(__NR_srp_up, od); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | int omlp_down(int od) | ||
| 65 | { | ||
| 66 | return syscall(__NR_omlp_down, od); | ||
| 67 | } | ||
| 68 | |||
| 69 | int omlp_up(int od) | ||
| 70 | { | ||
| 71 | return syscall(__NR_omlp_up, od); | ||
| 72 | } | ||
| 73 | |||
| 64 | int get_job_no(unsigned int *job_no) | 74 | int get_job_no(unsigned int *job_no) |
| 65 | { | 75 | { |
| 66 | return syscall(__NR_query_job_no, job_no); | 76 | return syscall(__NR_query_job_no, job_no); |
