nghttpx: Only use thread_local if NOTHREADS is not defined

This commit is contained in:
Tatsuhiro Tsujikawa 2014-07-08 21:28:11 +09:00
parent d3ca003346
commit 0d1ebd73de
2 changed files with 9 additions and 2 deletions

View File

@ -32,7 +32,10 @@ WorkerConfig::WorkerConfig()
errorlog_tty(false)
{}
thread_local WorkerConfig worker_config;
#ifndef NOTHREADS
thread_local
#endif // NOTHREADS
WorkerConfig worker_config;
} // namespace shrpx

View File

@ -39,7 +39,11 @@ struct WorkerConfig {
};
// We need WorkerConfig per thread
extern thread_local WorkerConfig worker_config;
extern
#ifndef NOTHREADS
thread_local
#endif // NOTHREADS
WorkerConfig worker_config;
} // namespace shrpx