|
@@ -43,11 +43,13 @@ static LIST_HEAD ( run_queue );
|
43
|
43
|
*/
|
44
|
44
|
void process_add ( struct process *process ) {
|
45
|
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
|
48
|
ref_get ( process->refcnt );
|
48
|
49
|
list_add_tail ( &process->list, &run_queue );
|
49
|
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,12 +63,14 @@ void process_add ( struct process *process ) {
|
61
|
63
|
*/
|
62
|
64
|
void process_del ( struct process *process ) {
|
63
|
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
|
68
|
list_del ( &process->list );
|
66
|
69
|
INIT_LIST_HEAD ( &process->list );
|
67
|
70
|
ref_put ( process->refcnt );
|
68
|
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,9 +87,11 @@ void step ( void ) {
|
83
|
87
|
list_del ( &process->list );
|
84
|
88
|
list_add_tail ( &process->list, &run_queue );
|
85
|
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
|
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
|
95
|
ref_put ( process->refcnt ); /* Allow destruction */
|
90
|
96
|
break;
|
91
|
97
|
}
|