summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2018-02-20 19:02:25 +0100
committerMichael Brown2018-02-20 19:02:25 +0100
commit47849be3a900c546cf92066849be0806f4e611d9 (patch)
tree9cda8a0a1b1a236a86c93869d349fbdcb0705e6c
parent[efi] Raise TPL within EFI_USB_IO_PROTOCOL entry points (diff)
downloadipxe-47849be3a900c546cf92066849be0806f4e611d9.tar.gz
ipxe-47849be3a900c546cf92066849be0806f4e611d9.tar.xz
ipxe-47849be3a900c546cf92066849be0806f4e611d9.zip
[process] Include process name in debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/include/ipxe/process.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/include/ipxe/process.h b/src/include/ipxe/process.h
index d600508e..0d059f8a 100644
--- a/src/include/ipxe/process.h
+++ b/src/include/ipxe/process.h
@@ -29,6 +29,8 @@ struct process {
/** A process descriptor */
struct process_descriptor {
+ /** Process name */
+ const char *name;
/** Offset of process within containing object */
size_t offset;
/**
@@ -78,6 +80,7 @@ struct process_descriptor {
* @ret desc Object interface descriptor
*/
#define PROC_DESC( object_type, process, _step ) { \
+ .name = #_step, \
.offset = process_offset ( object_type, process ), \
.step = PROC_STEP ( object_type, _step ), \
.reschedule = 1, \
@@ -92,6 +95,7 @@ struct process_descriptor {
* @ret desc Object interface descriptor
*/
#define PROC_DESC_ONCE( object_type, process, _step ) { \
+ .name = #_step, \
.offset = process_offset ( object_type, process ), \
.step = PROC_STEP ( object_type, _step ), \
.reschedule = 0, \
@@ -106,6 +110,7 @@ struct process_descriptor {
* @ret desc Object interface descriptor
*/
#define PROC_DESC_PURE( _step ) { \
+ .name = #_step, \
.offset = 0, \
.step = PROC_STEP ( struct process, _step ), \
.reschedule = 1, \
@@ -192,7 +197,7 @@ struct process name __permanent_process = { \
#define PROC_COL( process ) process_object ( process )
/** printf() format string for PROC_DBG() */
-#define PROC_FMT "%p+%zx"
+#define PROC_FMT "%p %s()"
/**
* printf() arguments for representing a process
@@ -200,6 +205,6 @@ struct process name __permanent_process = { \
* @v process Process
* @ret args printf() argument list corresponding to PROC_FMT
*/
-#define PROC_DBG( process ) process_object ( process ), (process)->desc->offset
+#define PROC_DBG( process ) process_object ( process ), (process)->desc->name
#endif /* _IPXE_PROCESS_H */