summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-01-17 23:14:17 +0100
committerClifford Wolf <clifford@clifford.at>2014-01-17 23:14:17 +0100
commit548d5aafa4f2f51531f0f991a8725a0ab72b50c8 (patch)
tree75255281e71f826dfc8c3701d90284307ad7ad65
parentdb9cf544b8cf4c303610acc59c21a3dec346af62 (diff)
Some improvements in log_dump_val_worker() templates
-rw-r--r--kernel/log.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/log.h b/kernel/log.h
index 5ee6b565..c4c03352 100644
--- a/kernel/log.h
+++ b/kernel/log.h
@@ -95,11 +95,16 @@ struct PerformanceTimer
// simple API for quickly dumping values when debugging
+static inline void log_dump_val_worker(short v) { log("%d", v); }
+static inline void log_dump_val_worker(unsigned short v) { log("%u", v); }
static inline void log_dump_val_worker(int v) { log("%d", v); }
-static inline void log_dump_val_worker(size_t v) { log("%zd", v); }
+static inline void log_dump_val_worker(unsigned int v) { log("%u", v); }
static inline void log_dump_val_worker(long int v) { log("%ld", v); }
+static inline void log_dump_val_worker(unsigned long int v) { log("%lu", v); }
static inline void log_dump_val_worker(long long int v) { log("%lld", v); }
+static inline void log_dump_val_worker(unsigned long long int v) { log("%lld", v); }
static inline void log_dump_val_worker(char c) { log(c >= 32 && c < 127 ? "'%c'" : "'\\x%02x'", c); }
+static inline void log_dump_val_worker(unsigned char c) { log(c >= 32 && c < 127 ? "'%c'" : "'\\x%02x'", c); }
static inline void log_dump_val_worker(bool v) { log("%s", v ? "true" : "false"); }
static inline void log_dump_val_worker(double v) { log("%f", v); }
static inline void log_dump_val_worker(const char *v) { log("%s", v); }