Browse Source

[process] Include step() function pointer in process debugging messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
de1381578b
1 changed files with 12 additions and 6 deletions
  1. 12
    6
      src/core/process.c

+ 12
- 6
src/core/process.c View File

43
  */
43
  */
44
 void process_add ( struct process *process ) {
44
 void process_add ( struct process *process ) {
45
 	if ( ! process_running ( process ) ) {
45
 	if ( ! process_running ( process ) ) {
46
-		DBGC ( process, "PROCESS %p starting\n", process );
46
+		DBGC ( process, "PROCESS %p (%p) starting\n",
47
+		       process, process->step );
47
 		ref_get ( process->refcnt );
48
 		ref_get ( process->refcnt );
48
 		list_add_tail ( &process->list, &run_queue );
49
 		list_add_tail ( &process->list, &run_queue );
49
 	} else {
50
 	} else {
50
-		DBGC ( process, "PROCESS %p already started\n", process );
51
+		DBGC ( process, "PROCESS %p (%p) already started\n",
52
+		       process, process->step );
51
 	}
53
 	}
52
 }
54
 }
53
 
55
 
61
  */
63
  */
62
 void process_del ( struct process *process ) {
64
 void process_del ( struct process *process ) {
63
 	if ( process_running ( process ) ) {
65
 	if ( process_running ( process ) ) {
64
-		DBGC ( process, "PROCESS %p stopping\n", process );
66
+		DBGC ( process, "PROCESS %p (%p) stopping\n",
67
+		       process, process->step );
65
 		list_del ( &process->list );
68
 		list_del ( &process->list );
66
 		INIT_LIST_HEAD ( &process->list );
69
 		INIT_LIST_HEAD ( &process->list );
67
 		ref_put ( process->refcnt );
70
 		ref_put ( process->refcnt );
68
 	} else {
71
 	} else {
69
-		DBGC ( process, "PROCESS %p already stopped\n", process );
72
+		DBGC ( process, "PROCESS %p (%p) already stopped\n",
73
+		       process, process->step );
70
 	}
74
 	}
71
 }
75
 }
72
 
76
 
83
 		list_del ( &process->list );
87
 		list_del ( &process->list );
84
 		list_add_tail ( &process->list, &run_queue );
88
 		list_add_tail ( &process->list, &run_queue );
85
 		ref_get ( process->refcnt ); /* Inhibit destruction mid-step */
89
 		ref_get ( process->refcnt ); /* Inhibit destruction mid-step */
86
-		DBGC2 ( process, "PROCESS %p executing\n", process );
90
+		DBGC2 ( process, "PROCESS %p (%p) executing\n",
91
+			process, process->step );
87
 		process->step ( process );
92
 		process->step ( process );
88
-		DBGC2 ( process, "PROCESS %p finished executing\n", process );
93
+		DBGC2 ( process, "PROCESS %p (%p) finished executing\n",
94
+			process, process->step );
89
 		ref_put ( process->refcnt ); /* Allow destruction */
95
 		ref_put ( process->refcnt ); /* Allow destruction */
90
 		break;
96
 		break;
91
 	}
97
 	}

Loading…
Cancel
Save