diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/litmus.h | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/include/litmus.h b/include/litmus.h index 955f239..2e26868 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
| @@ -51,8 +51,15 @@ int sporadic_task_ns( | |||
| 51 | typedef enum { | 51 | typedef enum { |
| 52 | FMLP_SEM = 0, | 52 | FMLP_SEM = 0, |
| 53 | SRP_SEM = 1, | 53 | SRP_SEM = 1, |
| 54 | RSM_SEM = 2, | 54 | |
| 55 | IKGLP_SEM = 3, | 55 | RSM_MUTEX = 2, |
| 56 | IKGLP_SEM = 3, | ||
| 57 | KFMLP_SEM = 4, | ||
| 58 | |||
| 59 | IKGLP_SIMPLE_GPU_AFF_OBS = 5, | ||
| 60 | IKGLP_GPU_AFF_OBS = 6, | ||
| 61 | KFMLP_SIMPLE_GPU_AFF_OBS = 7, | ||
| 62 | KFMLP_GPU_AFF_OBS = 8, | ||
| 56 | } obj_type_t; | 63 | } obj_type_t; |
| 57 | 64 | ||
| 58 | int od_openx(int fd, obj_type_t type, int obj_id, void* config); | 65 | int od_openx(int fd, obj_type_t type, int obj_id, void* config); |
| @@ -76,7 +83,11 @@ int litmus_unlock(int od); | |||
| 76 | */ | 83 | */ |
| 77 | int litmus_dgl_lock(int* ods, int dgl_size); | 84 | int litmus_dgl_lock(int* ods, int dgl_size); |
| 78 | int litmus_dgl_unlock(int* ods, int dgl_size); | 85 | int litmus_dgl_unlock(int* ods, int dgl_size); |
| 79 | 86 | ||
| 87 | /* nvidia graphics cards */ | ||
| 88 | int register_nv_device(int nv_device_id); | ||
| 89 | int unregister_nv_device(int nv_device_id); | ||
| 90 | |||
| 80 | /* job control*/ | 91 | /* job control*/ |
| 81 | int get_job_no(unsigned int* job_no); | 92 | int get_job_no(unsigned int* job_no); |
| 82 | int wait_for_job_release(unsigned int job_no); | 93 | int wait_for_job_release(unsigned int job_no); |
| @@ -134,6 +145,11 @@ static inline int open_fmlp_sem(int fd, int name) | |||
| 134 | return od_open(fd, FMLP_SEM, name); | 145 | return od_open(fd, FMLP_SEM, name); |
| 135 | } | 146 | } |
| 136 | 147 | ||
| 148 | static inline int open_kfmlp_sem(int fd, int name, void* arg) | ||
| 149 | { | ||
| 150 | return od_openx(fd, KFMLP_SEM, name, arg); | ||
| 151 | } | ||
| 152 | |||
| 137 | static inline int open_srp_sem(int fd, int name) | 153 | static inline int open_srp_sem(int fd, int name) |
| 138 | { | 154 | { |
| 139 | return od_open(fd, SRP_SEM, name); | 155 | return od_open(fd, SRP_SEM, name); |
| @@ -141,14 +157,38 @@ static inline int open_srp_sem(int fd, int name) | |||
| 141 | 157 | ||
| 142 | static inline int open_rsm_sem(int fd, int name) | 158 | static inline int open_rsm_sem(int fd, int name) |
| 143 | { | 159 | { |
| 144 | return od_open(fd, RSM_SEM, name); | 160 | return od_open(fd, RSM_MUTEX, name); |
| 145 | } | 161 | } |
| 146 | 162 | ||
| 147 | static inline int open_ikglp_sem(int fd, int name, void *arg) | 163 | static inline int open_ikglp_sem(int fd, int name, void *arg) |
| 148 | { | 164 | { |
| 149 | return od_openx(fd, IKGLP_SEM, name, arg); | 165 | return od_openx(fd, IKGLP_SEM, name, arg); |
| 150 | } | 166 | } |
| 167 | |||
| 168 | static inline int open_kfmlp_simple_gpu_aff_obs(int fd, int name, struct gpu_affinity_observer_args *arg) | ||
| 169 | { | ||
| 170 | return od_openx(fd, KFMLP_SIMPLE_GPU_AFF_OBS, name, arg); | ||
| 171 | } | ||
| 172 | |||
| 173 | static inline int open_kfmlp_gpu_aff_obs(int fd, int name, struct gpu_affinity_observer_args *arg) | ||
| 174 | { | ||
| 175 | return od_openx(fd, KFMLP_GPU_AFF_OBS, name, arg); | ||
| 176 | } | ||
| 177 | |||
| 178 | static inline int open_ikglp_simple_gpu_aff_obs(int fd, int name, void *arg) | ||
| 179 | { | ||
| 180 | return od_openx(fd, IKGLP_SIMPLE_GPU_AFF_OBS, name, arg); | ||
| 181 | } | ||
| 182 | |||
| 183 | static inline int open_ikglp_gpu_aff_obs(int fd, int name, void *arg) | ||
| 184 | { | ||
| 185 | return od_openx(fd, IKGLP_GPU_AFF_OBS, name, arg); | ||
| 186 | } | ||
| 151 | 187 | ||
| 188 | // takes names "name" and "name+1" | ||
| 189 | int open_kfmlp_gpu_sem(int fd, int name, int num_gpus, int gpu_offset, int num_simult_users, int affinity_aware); | ||
| 190 | int open_ikglp_gpu_sem(int fd, int name, int num_gpus, int gpu_offset, int num_simult_users, int affinity_aware, int relax_max_fifo_len); | ||
| 191 | |||
| 152 | /* syscall overhead measuring */ | 192 | /* syscall overhead measuring */ |
| 153 | int null_call(cycles_t *timestamp); | 193 | int null_call(cycles_t *timestamp); |
| 154 | 194 | ||
