diff options
author | ztong <ztong@cs.unc.edu> | 2021-02-16 16:10:45 -0500 |
---|---|---|
committer | ztong <ztong@cs.unc.edu> | 2021-02-16 16:10:45 -0500 |
commit | 78c0cda81ab19c68ee8302d24c7e30e3c45e8618 (patch) | |
tree | d4de9977bad9f63ad309b1eeaf1c07c730995839 | |
parent | 8dd0d6050242296733e27b4524d89dd3dc84b3fe (diff) |
Changed syscall for access_forbidden_zone_check
-rw-r--r-- | bin/rtspin.c | 2 | ||||
-rw-r--r-- | include/litmus.h | 2 | ||||
-rw-r--r-- | src/litmus.c | 2 | ||||
-rw-r--r-- | src/syscalls.c | 3 |
4 files changed, 5 insertions, 4 deletions
diff --git a/bin/rtspin.c b/bin/rtspin.c index 70b5528..28bc956 100644 --- a/bin/rtspin.c +++ b/bin/rtspin.c | |||
@@ -314,7 +314,7 @@ static void job(double exec_time, double program_end, int lock_od, double cs_len | |||
314 | /* critical section */ | 314 | /* critical section */ |
315 | litmus_lock(lock_od); | 315 | litmus_lock(lock_od); |
316 | if (check_fz) | 316 | if (check_fz) |
317 | litmus_access_forbidden_zone_check(lock_od, s2ns(cs_length)); | 317 | litmus_access_forbidden_zone_check(lock_od, s2ns(cs_length), 0.9 * s2ns(cs_length)); |
318 | loop_for(cs_length, program_end + 1); | 318 | loop_for(cs_length, program_end + 1); |
319 | litmus_unlock(lock_od); | 319 | litmus_unlock(lock_od); |
320 | 320 | ||
diff --git a/include/litmus.h b/include/litmus.h index 8ccd0b7..b4affb1 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
@@ -239,7 +239,7 @@ int litmus_lock(int od); | |||
239 | * @param od Object descriptor obtained by litmus_open_lock() | 239 | * @param od Object descriptor obtained by litmus_open_lock() |
240 | * @return 0 iff the resource access was granted successfully | 240 | * @return 0 iff the resource access was granted successfully |
241 | */ | 241 | */ |
242 | int litmus_access_forbidden_zone_check(int od, lt_t fz_len); | 242 | int litmus_access_forbidden_zone_check(int od, lt_t fz_len, lt_t fz_police); |
243 | /** | 243 | /** |
244 | * Release lock | 244 | * Release lock |
245 | * @param od Object descriptor obtained by litmus_open_lock() | 245 | * @param od Object descriptor obtained by litmus_open_lock() |
diff --git a/src/litmus.c b/src/litmus.c index 8ddc3d9..26e9758 100644 --- a/src/litmus.c +++ b/src/litmus.c | |||
@@ -106,7 +106,7 @@ void init_rt_task_param(struct rt_task* tp) | |||
106 | tp->priority = LITMUS_LOWEST_PRIORITY; | 106 | tp->priority = LITMUS_LOWEST_PRIORITY; |
107 | tp->budget_policy = NO_ENFORCEMENT; | 107 | tp->budget_policy = NO_ENFORCEMENT; |
108 | tp->release_policy = TASK_SPORADIC; | 108 | tp->release_policy = TASK_SPORADIC; |
109 | tp->pinned_cpu = -1; | 109 | tp->pinned_cpu = 0xffffffff; |
110 | } | 110 | } |
111 | 111 | ||
112 | task_class_t str2class(const char* str) | 112 | task_class_t str2class(const char* str) |
diff --git a/src/syscalls.c b/src/syscalls.c index 9a1a1c3..a87a6fe 100644 --- a/src/syscalls.c +++ b/src/syscalls.c | |||
@@ -67,11 +67,12 @@ int litmus_lock(int od) | |||
67 | return litmus_syscall(LRT_litmus_lock, od); | 67 | return litmus_syscall(LRT_litmus_lock, od); |
68 | } | 68 | } |
69 | 69 | ||
70 | int litmus_access_forbidden_zone_check(int od, lt_t fz_len) | 70 | int litmus_access_forbidden_zone_check(int od, lt_t fz_len, lt_t fz_police) |
71 | { | 71 | { |
72 | union litmus_syscall_args args; | 72 | union litmus_syscall_args args; |
73 | args.access_forbidden_zone_check.sem_od = od; | 73 | args.access_forbidden_zone_check.sem_od = od; |
74 | args.access_forbidden_zone_check.fz_len = fz_len; | 74 | args.access_forbidden_zone_check.fz_len = fz_len; |
75 | args.access_forbidden_zone_check.fz_police = fz_police; | ||
75 | return litmus_syscall(LRT_access_forbidden_zone_check, (unsigned long) &args); | 76 | return litmus_syscall(LRT_access_forbidden_zone_check, (unsigned long) &args); |
76 | } | 77 | } |
77 | 78 | ||