aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/srp.c
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-01-28 16:41:16 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-02-01 16:30:39 -0500
commitcc602187d4466374bca031039e145aa1b89aca96 (patch)
treea92f08cd0ecfd462a694b23f22fedd36ef2aaecf /litmus/srp.c
parenta3db326495d4051bddc657d3b226ad4daa7997c4 (diff)
Litmus core: replace FMLP & SRP system calls with generic syscalls
This renders the FMLP and SRP unfunctional until they are ported to the new locking API.
Diffstat (limited to 'litmus/srp.c')
-rw-r--r--litmus/srp.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/litmus/srp.c b/litmus/srp.c
index 4601b7dba812..b4c171e79fd4 100644
--- a/litmus/srp.c
+++ b/litmus/srp.c
@@ -189,55 +189,6 @@ static void do_srp_up(struct srp_semaphore* sem)
189 wake_up_all(&__get_cpu_var(srp).ceiling_blocked); 189 wake_up_all(&__get_cpu_var(srp).ceiling_blocked);
190} 190}
191 191
192/* Adjust the system-wide priority ceiling if resource is claimed. */
193asmlinkage long sys_srp_down(int sem_od)
194{
195 int cpu;
196 int ret = -EINVAL;
197 struct srp_semaphore* sem;
198
199 /* disabling preemptions is sufficient protection since
200 * SRP is strictly per CPU and we don't interfere with any
201 * interrupt handlers
202 */
203 preempt_disable();
204 TS_SRP_DOWN_START;
205
206 cpu = smp_processor_id();
207 sem = lookup_srp_sem(sem_od);
208 if (sem && sem->cpu == cpu) {
209 do_srp_down(sem);
210 ret = 0;
211 }
212
213 TS_SRP_DOWN_END;
214 preempt_enable();
215 return ret;
216}
217
218/* Adjust the system-wide priority ceiling if resource is freed. */
219asmlinkage long sys_srp_up(int sem_od)
220{
221 int cpu;
222 int ret = -EINVAL;
223 struct srp_semaphore* sem;
224
225 preempt_disable();
226 TS_SRP_UP_START;
227
228 cpu = smp_processor_id();
229 sem = lookup_srp_sem(sem_od);
230
231 if (sem && sem->cpu == cpu) {
232 do_srp_up(sem);
233 ret = 0;
234 }
235
236 TS_SRP_UP_END;
237 preempt_enable();
238 return ret;
239}
240
241static int srp_wake_up(wait_queue_t *wait, unsigned mode, int sync, 192static int srp_wake_up(wait_queue_t *wait, unsigned mode, int sync,
242 void *key) 193 void *key)
243{ 194{
@@ -303,16 +254,6 @@ void srp_ceiling_block(void)
303 254
304#else 255#else
305 256
306asmlinkage long sys_srp_down(int sem_od)
307{
308 return -ENOSYS;
309}
310
311asmlinkage long sys_srp_up(int sem_od)
312{
313 return -ENOSYS;
314}
315
316struct fdso_ops srp_sem_ops = {}; 257struct fdso_ops srp_sem_ops = {};
317 258
318#endif 259#endif