affinity: add call to setup function in threads

Threads created through TMThreadSpawn need to call the affinity
function by themselves.
pull/54/merge
Eric Leblond 13 years ago committed by Victor Julien
parent 0eeccb4b17
commit d1569337a7

@ -446,11 +446,15 @@ static void *SCPerfMgmtThread(void *arg)
SCLogWarning(SC_ERR_THREAD_INIT, "Unable to set thread name");
}
if (tv_local->thread_setup_flags != 0)
TmThreadSetupOptions(tv_local);
/* Set the threads capability */
tv_local->cap_flags = 0;
SCDropCaps(tv_local);
if (sc_perf_op_ctx == NULL) {
SCLogError(SC_ERR_PERF_STATS_NOT_INIT, "Perf Counter API not init"
"SCPerfInitCounterApi() has to be called first");
@ -507,6 +511,9 @@ static void *SCPerfWakeupThread(void *arg)
SCLogWarning(SC_ERR_THREAD_INIT, "Unable to set thread name");
}
if (tv_local->thread_setup_flags != 0)
TmThreadSetupOptions(tv_local);
/* Set the threads capability */
tv_local->cap_flags = 0;

@ -88,6 +88,9 @@ static void *DetectEngineLiveRuleSwap(void *arg)
/* block usr2. usr2 to be handled by the main thread only */
UtilSignalBlock(SIGUSR2);
if (tv_local->thread_setup_flags != 0)
TmThreadSetupOptions(tv_local);
/* release TmThreadSpawn */
TmThreadsSetFlag(tv_local, THV_INIT_DONE);

@ -418,6 +418,9 @@ void *FlowManagerThread(void *td)
SC_PERF_TYPE_UINT64,
"NULL");
if (th_v->thread_setup_flags != 0)
TmThreadSetupOptions(th_v);
memset(&ts, 0, sizeof(ts));
FlowForceReassemblySetup();

Loading…
Cancel
Save