Commit 45d2ca6f authored by Jan Kiszka's avatar Jan Kiszka
Browse files

cobalt/rtdm: Switch rtdm_printk_ratelimited to xnclock_ratelimit



Will allow to remove the RTDM-specific core.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent dac9cafd
...@@ -1236,14 +1236,10 @@ int rtdm_ratelimit(struct rtdm_ratelimit_state *rs, const char *func); ...@@ -1236,14 +1236,10 @@ int rtdm_ratelimit(struct rtdm_ratelimit_state *rs, const char *func);
#define DEF_RTDM_RATELIMIT_INTERVAL 5000000000LL #define DEF_RTDM_RATELIMIT_INTERVAL 5000000000LL
#define DEF_RTDM_RATELIMIT_BURST 10 #define DEF_RTDM_RATELIMIT_BURST 10
#define rtdm_printk_ratelimited(fmt, ...) ({ \ #define rtdm_printk_ratelimited(fmt, ...) do { \
static DEFINE_RTDM_RATELIMIT_STATE(_rs, \ if (xnclock_ratelimit()) \
DEF_RTDM_RATELIMIT_INTERVAL, \
DEF_RTDM_RATELIMIT_BURST); \
\
if (rtdm_ratelimit(&_rs, __func__)) \
printk(fmt, ##__VA_ARGS__); \ printk(fmt, ##__VA_ARGS__); \
}) } while (0)
#ifndef DOXYGEN_CPP /* Avoid static inline tags for RTDM in doxygen */ #ifndef DOXYGEN_CPP /* Avoid static inline tags for RTDM in doxygen */
static inline void *rtdm_malloc(size_t size) static inline void *rtdm_malloc(size_t size)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment