mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Provide a macro to read rimestats when enabled
This commit is contained in:
parent
12860ce5d4
commit
62366813b0
@ -55,12 +55,15 @@ struct rimestats {
|
||||
unsigned long lltx, llrx;
|
||||
};
|
||||
|
||||
#if RIMESTATS_CONF_ENABLED
|
||||
/* Don't access this variable directly, use RIMESTATS_ADD and RIMESTATS_GET */
|
||||
extern struct rimestats rimestats;
|
||||
|
||||
#if RIMESTATS_CONF_ENABLED
|
||||
#define RIMESTATS_ADD(x) rimestats.x++
|
||||
#define RIMESTATS_GET(x) rimestats.x
|
||||
#else /* RIMESTATS_CONF_ENABLED */
|
||||
#define RIMESTATS_ADD(x)
|
||||
#define RIMESTATS_GET(x) 0
|
||||
#endif /* RIMESTATS_CONF_ENABLED */
|
||||
|
||||
#endif /* __RIMESTATS_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user