Add variants to I_AM_HERE
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 8 Nov 2017 16:24:45 +0000 (11:24 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 16 Nov 2017 15:46:55 +0000 (10:46 -0500)
For trace printing (viewable with dmesg) and/or printxing.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/stdio.h

index e06e920..ce0f048 100644 (file)
 #endif
 
 #define printk(args...) cprintf(args)
-#define I_AM_HERE printk("Core %d is in %s() at %s:%d\n", core_id(), \
-                         __FUNCTION__, __FILE__, __LINE__);
+#define __I_AM_HERE_GUTS "Core %d is in %s() at %s:%d\n", core_id(), \
+                         __func__, __FILE__, __LINE__
+
+#define I_AM_HERE printk(__I_AM_HERE_GUTS)
+#define I_AM_HERE_x printx(__I_AM_HERE_GUTS)
+#define I_AM_HERE_t trace_printk(__I_AM_HERE_GUTS)
+#define I_AM_HERE_tx trace_printx(__I_AM_HERE_GUTS)
 
 // lib/stdio.c
 void   cputchar(int c);