Browse code

kex: removed unused callbacks

Removed the two SREV_MODULE_PKG_STATS and SREV_MODULE_SHM_STATS callbacks
that were never used.

Stefan Mititelu authored on 02/11/2015 15:30:30
Showing 4 changed files
... ...
@@ -165,15 +165,6 @@ int sr_event_register_cb(int type, sr_event_cb_f f)
165 165
 					_sr_events_list.rcv_nosip = f;
166 166
 				else return -1;
167 167
 			break;
168
-		case SREV_MODULE_PKG_STATS:
169
-				if(_sr_events_list.mod_update_pkg_stats==0)
170
-					_sr_events_list.mod_update_pkg_stats = f;
171
-				else return -1;
172
-		case SREV_MODULE_SHM_STATS:
173
-				if(_sr_events_list.mod_update_shm_stats==0)
174
-					_sr_events_list.mod_update_shm_stats = f;
175
-				else return -1;
176
-			break;
177 168
 		default:
178 169
 			return -1;
179 170
 	}
... ...
@@ -293,18 +284,6 @@ int sr_event_exec(int type, void *data)
293 293
 					ret = _sr_events_list.rcv_nosip(data);
294 294
 					return ret;
295 295
 				} else return 1;
296
-		case SREV_MODULE_PKG_STATS:
297
-				if(unlikely(_sr_events_list.mod_update_pkg_stats!=0))
298
-				{
299
-					ret = _sr_events_list.mod_update_pkg_stats(data);
300
-					return ret;
301
-				} else return 1;
302
-		case SREV_MODULE_SHM_STATS:
303
-				if(unlikely(_sr_events_list.mod_update_shm_stats!=0))
304
-				{
305
-					ret = _sr_events_list.mod_update_shm_stats(data);
306
-					return ret;
307
-				} else return 1;
308 296
 		default:
309 297
 			return -1;
310 298
 	}
... ...
@@ -340,10 +319,6 @@ int sr_event_enabled(int type)
340 340
 				return (_sr_events_list.stun_in!=0)?1:0;
341 341
 		case SREV_RCV_NOSIP:
342 342
 				return (_sr_events_list.rcv_nosip!=0)?1:0;
343
-		case SREV_MODULE_PKG_STATS:
344
-				return (_sr_events_list.mod_update_pkg_stats!=0)?1:0;
345
-		case SREV_MODULE_SHM_STATS:
346
-				return (_sr_events_list.mod_update_shm_stats!=0)?1:0;
347 343
 	}
348 344
 	return 0;
349 345
 }
... ...
@@ -34,8 +34,6 @@
34 34
 #define SREV_TCP_WS_FRAME_IN		10
35 35
 #define SREV_TCP_WS_FRAME_OUT		11
36 36
 #define SREV_STUN_IN			12
37
-#define SREV_MODULE_PKG_STATS   13
38
-#define SREV_MODULE_SHM_STATS   14
39 37
 
40 38
 #define SREV_CB_LIST_SIZE	3
41 39
 
... ...
@@ -54,8 +52,6 @@ typedef struct sr_event_cb {
54 54
 	sr_event_cb_f tcp_ws_frame_out;
55 55
 	sr_event_cb_f stun_in;
56 56
 	sr_event_cb_f rcv_nosip;
57
-	sr_event_cb_f mod_update_pkg_stats;
58
-	sr_event_cb_f mod_update_shm_stats;
59 57
 } sr_event_cb_t;
60 58
 
61 59
 void sr_event_cb_init(void);
... ...
@@ -147,8 +147,7 @@ static int mod_init(void)
147 147
 	register_pkg_proc_stats();
148 148
 	pkg_proc_stats_init_rpc();
149 149
 
150
-	register_mod_stats();
151
-	mod_stats_init();
150
+	/* per module memmory debugging RPC command */
152 151
 	mod_stats_init_rpc();
153 152
 
154 153
 	return 0;
... ...
@@ -174,7 +173,6 @@ static int child_init(int rank)
174 174
 static void destroy(void)
175 175
 {
176 176
 	pkg_proc_stats_destroy();
177
-	mod_stats_destroy();
178 177
 	return;
179 178
 }
180 179
 
... ...
@@ -62,35 +62,6 @@ int mod_stats_destroy(void)
62 62
 	return 0;
63 63
 }
64 64
 
65
-
66
-/**
67
- *
68
- */
69
-static int mod_update_pkg_mod_stats_list(void *data)
70
-{
71
-	return 0;
72
-}
73
-
74
-
75
-/**
76
- *
77
- */
78
-static int mod_update_shm_mod_stats_list(void *data)
79
-{
80
-	return 0;
81
-}
82
-
83
-
84
-/**
85
- *
86
- */
87
-int register_mod_stats(void)
88
-{
89
-	sr_event_register_cb(SREV_MODULE_PKG_STATS, mod_update_pkg_mod_stats_list);
90
-	sr_event_register_cb(SREV_MODULE_SHM_STATS, mod_update_shm_mod_stats_list);
91
-	return 0;
92
-}
93
-
94 65
 /**
95 66
  *
96 67
  */