Changeset dc5c303 in mainline for kernel/generic/include/debug.h


Ignore:
Timestamp:
2023-12-28T13:59:23Z (6 months ago)
Author:
GitHub <noreply@…>
Children:
6b66de6b
Parents:
42c2e65 (diff), f87ff8e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2023-12-28 13:59:23)
git-committer:
GitHub <noreply@…> (2023-12-28 13:59:23)
Message:

Merge branch 'master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/debug.h

    r42c2e65 rdc5c303  
    3737
    3838#include <log.h>
    39 #include <symtab_lookup.h>
     39#include <printf/verify.h>
    4040
    4141#define CALLER  ((uintptr_t) __builtin_return_address(0))
     42
     43/* An empty printf function to ensure syntactic correctness of disabled debug prints. */
     44static inline void dummy_printf(const char *fmt, ...) _HELENOS_PRINTF_ATTRIBUTE(1, 2);
     45static inline void dummy_printf(const char *fmt, ...)
     46{
     47}
    4248
    4349#ifdef CONFIG_LOG
     
    5359        do { \
    5460                log(LF_OTHER, LVL_DEBUG, \
    55                     "%s() from %s at %s:%u: " format,__func__, \
     61                    "%s() from %s at %s:%u: " format, __func__, \
    5662                    symtab_fmt_name_lookup(CALLER), __FILE__, __LINE__, \
    5763                    ##__VA_ARGS__); \
     
    6066#else /* CONFIG_LOG */
    6167
    62 #define LOG(format, ...)
     68#define LOG(format, ...) dummy_printf(format, ##__VA_ARGS__)
    6369
    6470#endif /* CONFIG_LOG */
Note: See TracChangeset for help on using the changeset viewer.