ktr_log

Link to this paste: http://bugs.dragonflybsd.org/pastes/339

Added by Anonymous over 2 years ago.
Syntax: C

1
2
3
4
5
6
7
8
9
10
#define KTR_LOG(name, ...)                                              \
        if (ktr_ ## name ## _enable &&                                  \
            (ktr_ ## name ## _mask & *ktr_info_ ## name .kf_master_enable)) \
                do {                                                    \
                        struct ktr_entry *entry;                        \
                        entry = ktr_begin_write_entry(&ktr_info_ ## name, __FILE__, __LINE__); \
                        *(struct ktr_info_  ## name ## _args *)entry = \
                                (struct ktr_info_  ## name ## _args){ __VA_ARGS__}; \
                        ktr_finish_write_entry(&ktr_info_ ## name, entry); \
                } while (0)

Download