tm-thread: run thread init function sequentially.

On some setup you want to run each thread init function sequentially.
For example, if I use flow_cpu load balancing on AF_PACKET, my target
is to have CPU 0 (first socket in the group) to be link with the
thread 0 in detect cpu set (first thread to be initialised). A good
way to achieve this is to run only one thread init function at a time
to avoid any possible race condition.
pull/19/head
Eric Leblond 13 years ago
parent e28835af91
commit f389a1201f

@ -1710,6 +1710,8 @@ TmEcode TmThreadSpawn(ThreadVars *tv)
return TM_ECODE_FAILED;
}
TmThreadWaitForFlag(tv, THV_INIT_DONE);
TmThreadAppend(tv, tv->type);
return TM_ECODE_OK;

Loading…
Cancel
Save