1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20 #ifndef __STATS_H__
21 #define __STATS_H__
22
23 #include <stdint.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #define STATS_SECT_DECL(__name) struct stats_ ## __name
30 #define STATS_SECT_END };
31
32 #define STATS_SECT_START(__name) STATS_SECT_DECL(__name) {
33 #define STATS_SECT_VAR(__var)
34
35 #define STATS_HDR(__sectname) NULL
36
37 #define STATS_SECT_ENTRY(__var)
38 #define STATS_SECT_ENTRY16(__var)
39 #define STATS_SECT_ENTRY32(__var)
40 #define STATS_SECT_ENTRY64(__var)
41 #define STATS_RESET(__var)
42
43 #define STATS_SIZE_INIT_PARMS(__sectvarname, __size) \
44 0, 0
45
46 #define STATS_INC(__sectvarname, __var)
47 #define STATS_INCN(__sectvarname, __var, __n)
48 #define STATS_CLEAR(__sectvarname, __var)
49
50 #define STATS_NAME_START(__name)
51 #define STATS_NAME(__name, __entry)
52 #define STATS_NAME_END(__name)
53 #define STATS_NAME_INIT_PARMS(__name) NULL, 0
54
stats_init(void * a,uint8_t b,uint8_t c,void * d,uint8_t e)55 static inline int stats_init(void *a, uint8_t b, uint8_t c, void *d, uint8_t e)
56 {
57 /* dummy */
58 return 0;
59 }
60
stats_register(void * a,void * b)61 static inline int stats_register(void *a, void *b)
62 {
63 /* dummy */
64 return 0;
65 }
66
stats_init_and_reg(void * a,uint8_t b,uint8_t c,void * d,uint8_t e,void * f)67 static inline int stats_init_and_reg(void *a, uint8_t b, uint8_t c, void *d, uint8_t e, void *f)
68 {
69 /* dummy */
70 return 0;
71 }
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif /* __STATS_H__ */