1 /* ckrm-iostub.c - Stub file for ckrm_io module
3 * Copyright (C) Shailabh Nagar, IBM Corp. 2004
5 * Latest version, more details at http://ckrm.sf.net
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
16 * 07 Aug 2004: Created
20 #include <linux/spinlock.h>
21 #include <linux/module.h>
22 #include <linux/ckrm-io.h>
24 static spinlock_t stub_lock = SPIN_LOCK_UNLOCKED;
26 static icls_tsk_t tskiclstub;
27 static icls_ioprio_t tskiopriostub;
30 void cki_cfq_set(icls_tsk_t tskicls, icls_ioprio_t tskioprio)
32 spin_lock(&stub_lock);
34 tskiopriostub = tskioprio;
35 spin_unlock(&stub_lock);
38 inline void *cki_hash_key(struct task_struct *tsk)
41 spin_lock(&stub_lock);
43 ret = (*tskiclstub)(tsk);
45 ret = (void *) tsk->tgid;
46 spin_unlock(&stub_lock);
50 inline int cki_ioprio(struct task_struct *tsk)
53 spin_lock(&stub_lock);
55 ret = (*tskiopriostub)(tsk);
58 spin_unlock(&stub_lock);
62 EXPORT_SYMBOL(cki_cfq_set);
63 EXPORT_SYMBOL(cki_hash_key);
64 EXPORT_SYMBOL(cki_ioprio);