static ngx_inline void
ngx_regex_malloc_init(ngx_pool_t *pool)
{
-#if (NGX_OLD_THREADS)
- ngx_core_tls_t *tls;
-
- if (ngx_threaded) {
- tls = ngx_thread_get_tls(ngx_core_tls_key);
- tls->pool = pool;
- return;
- }
-
-#endif
-
ngx_pcre_pool = pool;
}
static ngx_inline void
ngx_regex_malloc_done(void)
{
-#if (NGX_OLD_THREADS)
- ngx_core_tls_t *tls;
-
- if (ngx_threaded) {
- tls = ngx_thread_get_tls(ngx_core_tls_key);
- tls->pool = NULL;
- return;
- }
-
-#endif
-
ngx_pcre_pool = NULL;
}
ngx_regex_malloc(size_t size)
{
ngx_pool_t *pool;
-#if (NGX_OLD_THREADS)
- ngx_core_tls_t *tls;
-
- if (ngx_threaded) {
- tls = ngx_thread_get_tls(ngx_core_tls_key);
- pool = tls->pool;
-
- } else {
- pool = ngx_pcre_pool;
- }
-
-#else
-
pool = ngx_pcre_pool;
-#endif
-
if (pool) {
return ngx_palloc(pool, size);
}
extern ngx_uint_t ngx_process;
extern ngx_pid_t ngx_pid;
-extern ngx_uint_t ngx_threaded;
extern ngx_uint_t ngx_exiting;
extern sig_atomic_t ngx_quit;