1 /* ckrm_tsk.h - No. of tasks resource controller for CKRM
3 * Copyright (C) Chandra Seetharaman, IBM Corp. 2003
5 * Provides No. of tasks resource controller for CKRM
7 * Latest version, more details at http://ckrm.sf.net
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
16 #ifndef _LINUX_CKRM_TSK_H
17 #define _LINUX_CKRM_TSK_H
19 #ifdef CONFIG_CKRM_TYPE_TASKCLASS
20 #include <linux/ckrm_rc.h>
22 typedef int (*get_ref_t) (struct ckrm_core_class *, int);
23 typedef void (*put_ref_t) (struct ckrm_core_class *);
25 extern int numtasks_get_ref(struct ckrm_core_class *, int);
26 extern void numtasks_put_ref(struct ckrm_core_class *);
27 extern void ckrm_numtasks_register(get_ref_t, put_ref_t);
29 #else /* CONFIG_CKRM_TYPE_TASKCLASS */
31 #define numtasks_get_ref(core_class, ref) (1)
32 #define numtasks_put_ref(core_class) do {} while (0)
34 #endif /* CONFIG_CKRM_TYPE_TASKCLASS */
35 #endif /* _LINUX_CKRM_RES_H */