Skip to content

Commit

Permalink
core/debug: printf what asked to print
Browse files Browse the repository at this point in the history
  • Loading branch information
kfessel committed Dec 12, 2023
1 parent bb07bb6 commit b39fbe2
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions core/lib/include/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,7 @@ extern "C" {
*/
#ifdef DEVELHELP
#include "cpu_conf.h"
#define DEBUG_PRINT(...) \
do { \
if ((thread_get_active() == NULL) || \
(thread_get_active()->stack_size >= \
THREAD_EXTRA_STACKSIZE_PRINTF)) { \
printf(__VA_ARGS__); \
} \
else { \
puts("Cannot debug, stack too small. Consider using DEBUG_PUTS()."); \
} \
} while (0)
#define DEBUG_PRINT(...) do { printf(__VA_ARGS__); } while (0)
#else
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
#endif
Expand Down

0 comments on commit b39fbe2

Please sign in to comment.