[process] Make it safe to call process_add() multiple times

This commit is contained in:
Michael Brown
2009-08-10 01:09:41 +01:00
parent 46073f1239
commit 04878ef745
5 changed files with 14 additions and 3 deletions

View File

@@ -47,6 +47,7 @@ static inline __attribute__ (( always_inline )) void
process_init_stopped ( struct process *process,
void ( * step ) ( struct process *process ),
struct refcnt *refcnt ) {
INIT_LIST_HEAD ( &process->list );
process->step = step;
process->refcnt = refcnt;
}