diff options
author | Rich Felker <dalias@libc.org> | 2016-03-30 00:53:03 +0300 |
---|---|---|
committer | Rich Felker <dalias@libc.org> | 2016-03-30 00:53:03 +0300 |
commit | 16b02d711f4059b8338ef967064195b47cae65ea (patch) | |
tree | 6d3e0b7629210b56f8d6cfa39184c878d8a15367 /tools/lib/api/debug-internal.h | |
parent | b15d53d009558d14c4f394a6d1fa2039c7f45c43 (diff) | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) | |
download | linux-16b02d711f4059b8338ef967064195b47cae65ea.tar.xz |
Merge tag 'v4.6-rc1'
Linux 4.6-rc1
Diffstat (limited to 'tools/lib/api/debug-internal.h')
-rw-r--r-- | tools/lib/api/debug-internal.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/lib/api/debug-internal.h b/tools/lib/api/debug-internal.h new file mode 100644 index 000000000000..188f7880eafe --- /dev/null +++ b/tools/lib/api/debug-internal.h @@ -0,0 +1,20 @@ +#ifndef __API_DEBUG_INTERNAL_H__ +#define __API_DEBUG_INTERNAL_H__ + +#include "debug.h" + +#define __pr(func, fmt, ...) \ +do { \ + if ((func)) \ + (func)("libapi: " fmt, ##__VA_ARGS__); \ +} while (0) + +extern libapi_print_fn_t __pr_warning; +extern libapi_print_fn_t __pr_info; +extern libapi_print_fn_t __pr_debug; + +#define pr_warning(fmt, ...) __pr(__pr_warning, fmt, ##__VA_ARGS__) +#define pr_info(fmt, ...) __pr(__pr_info, fmt, ##__VA_ARGS__) +#define pr_debug(fmt, ...) __pr(__pr_debug, fmt, ##__VA_ARGS__) + +#endif /* __API_DEBUG_INTERNAL_H__ */ |