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.
16 * 16 May 2004: Created
20 #include <linux/spinlock.h>
21 #include <linux/module.h>
22 #include <linux/ckrm_tsk.h>
24 static spinlock_t stub_lock = SPIN_LOCK_UNLOCKED;
26 static get_ref_t real_get_ref = NULL;
27 static put_ref_t real_put_ref = NULL;
29 void ckrm_numtasks_register(get_ref_t gr, put_ref_t pr)
31 spin_lock(&stub_lock);
34 spin_unlock(&stub_lock);
37 int numtasks_get_ref(void *arg, int force)
40 spin_lock(&stub_lock);
42 ret = (*real_get_ref) (arg, force);
44 spin_unlock(&stub_lock);
48 void numtasks_put_ref(void *arg)
50 spin_lock(&stub_lock);
52 (*real_put_ref) (arg);
54 spin_unlock(&stub_lock);
57 EXPORT_SYMBOL(ckrm_numtasks_register);
58 EXPORT_SYMBOL(numtasks_get_ref);
59 EXPORT_SYMBOL(numtasks_put_ref);