ckrm_E16rc1 mem controller version 1
[linux-2.6.git] / kernel / ckrm / rbce / rbce.h
1 /* Rule-based Classification Engine (RBCE) module
2  *
3  * Copyright (C) Hubertus Franke, IBM Corp. 2003
4  *           (C) Chandra Seetharaman, IBM Corp. 2003
5  * 
6  * Module for loading of classification policies and providing
7  * a user API for Class-based Kernel Resource Management (CKRM)
8  *
9  * Latest version, more details at http://ckrm.sf.net
10  * 
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  */
17
18 /* Changes
19  *
20  * 25 Mar 2004
21  *        Integrate RBCE and CRBE into a single module
22  */
23
24 #ifndef RBCE_H
25 #define RBCE_H
26
27 // data types defined in main rbcemod.c 
28 struct rbce_private_data;
29 struct rbce_class;
30 struct ckrm_core_class;
31
32 #ifndef RBCE_EXTENSION
33
34 /****************************************************************************
35  *
36  *   RBCE STANDALONE VERSION, NO CHOICE FOR DATA COLLECTION
37  *
38  ****************************************************************************/
39
40 #ifdef RBCE_SHOW_INCL
41 #warning " ... RBCE .."
42 #endif
43
44 #define RBCE_MOD_DESCR "Rule Based Classification Engine Module for CKRM"
45 #define RBCE_MOD_NAME  "rbce"
46
47 /* extension to private data: NONE */
48 struct rbce_ext_private_data {
49         /* empty data */
50 };
51 static inline void init_ext_private_data(struct rbce_private_data *dst)
52 {
53 }
54
55 /* sending notification to user: NONE */
56
57 static void notify_class_action(struct rbce_class *cls, int action)
58 {
59 }
60 static inline void send_fork_notification(struct task_struct *tsk,
61                                           struct ckrm_core_class *cls)
62 {
63 }
64 static inline void send_exit_notification(struct task_struct *tsk)
65 {
66 }
67 static inline void send_manual_notification(struct task_struct *tsk)
68 {
69 }
70
71 /* extension initialization and destruction at module init and exit */
72 static inline int init_rbce_ext_pre(void)
73 {
74         return 0;
75 }
76 static inline int init_rbce_ext_post(void)
77 {
78         return 0;
79 }
80 static inline void exit_rbce_ext(void)
81 {
82 }
83
84 #else
85
86 /***************************************************************************
87  *
88  *   RBCE with User Level Notification
89  *
90  ***************************************************************************/
91
92 #ifdef RBCE_SHOW_INCL
93 #warning " ... CRBCE .."
94 #ifdef RBCE_DO_SAMPLE
95 #warning " ... CRBCE doing sampling ..."
96 #endif
97 #ifdef RBCE_DO_DELAY
98 #warning " ... CRBCE doing delay ..."
99 #endif
100 #endif
101
102 #define RBCE_MOD_DESCR  "Rule Based Classification Engine Module" \
103                         "with Data Sampling/Delivery for CKRM"
104 #define RBCE_MOD_NAME   "crbce"
105
106 #include "crbce.h"
107
108 struct rbce_ext_private_data {
109         struct task_sample_info sample;
110 };
111
112 static void notify_class_action(struct rbce_class *cls, int action);
113 #if 0
114 static void send_fork_notification(struct task_struct *tsk,
115                                    struct ckrm_core_class *cls);
116 static void send_exit_notification(struct task_struct *tsk);
117 static void send_manual_notification(struct task_struct *tsk);
118 #endif
119
120 #endif
121
122 #endif                          // RBCE_H