1 /* ckrm_tasks_stub.c - Stub file for ckrm_tasks modules
3 * Copyright (C) Chandra Seetharaman, 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.
14 #include <linux/spinlock.h>
15 #include <linux/module.h>
16 #include <linux/ckrm_tsk.h>
18 static spinlock_t stub_lock = SPIN_LOCK_UNLOCKED;
20 static get_ref_t real_get_ref = NULL;
21 static put_ref_t real_put_ref = NULL;
23 void ckrm_numtasks_register(get_ref_t gr, put_ref_t pr)
25 spin_lock(&stub_lock);
28 spin_unlock(&stub_lock);
31 int numtasks_get_ref(struct ckrm_core_class *arg, int force)
34 spin_lock(&stub_lock);
36 ret = (*real_get_ref) (arg, force);
38 spin_unlock(&stub_lock);
42 void numtasks_put_ref(struct ckrm_core_class *arg)
44 spin_lock(&stub_lock);
46 (*real_put_ref) (arg);
48 spin_unlock(&stub_lock);
51 EXPORT_SYMBOL(ckrm_numtasks_register);
52 EXPORT_SYMBOL(numtasks_get_ref);
53 EXPORT_SYMBOL(numtasks_put_ref);