Mercurial > hg > nginx
comparison src/core/ngx_regex.c @ 6109:d588dda5ec31
Removed ngx_threaded and related code.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 26 Mar 2015 14:15:13 +0300 |
parents | 457ec43dd8d5 |
children | 640288d0e1bc |
comparison
equal
deleted
inserted
replaced
6108:55dc5f7eb921 | 6109:d588dda5ec31 |
---|---|
78 | 78 |
79 | 79 |
80 static ngx_inline void | 80 static ngx_inline void |
81 ngx_regex_malloc_init(ngx_pool_t *pool) | 81 ngx_regex_malloc_init(ngx_pool_t *pool) |
82 { | 82 { |
83 #if (NGX_OLD_THREADS) | |
84 ngx_core_tls_t *tls; | |
85 | |
86 if (ngx_threaded) { | |
87 tls = ngx_thread_get_tls(ngx_core_tls_key); | |
88 tls->pool = pool; | |
89 return; | |
90 } | |
91 | |
92 #endif | |
93 | |
94 ngx_pcre_pool = pool; | 83 ngx_pcre_pool = pool; |
95 } | 84 } |
96 | 85 |
97 | 86 |
98 static ngx_inline void | 87 static ngx_inline void |
99 ngx_regex_malloc_done(void) | 88 ngx_regex_malloc_done(void) |
100 { | 89 { |
101 #if (NGX_OLD_THREADS) | |
102 ngx_core_tls_t *tls; | |
103 | |
104 if (ngx_threaded) { | |
105 tls = ngx_thread_get_tls(ngx_core_tls_key); | |
106 tls->pool = NULL; | |
107 return; | |
108 } | |
109 | |
110 #endif | |
111 | |
112 ngx_pcre_pool = NULL; | 90 ngx_pcre_pool = NULL; |
113 } | 91 } |
114 | 92 |
115 | 93 |
116 ngx_int_t | 94 ngx_int_t |
251 | 229 |
252 static void * ngx_libc_cdecl | 230 static void * ngx_libc_cdecl |
253 ngx_regex_malloc(size_t size) | 231 ngx_regex_malloc(size_t size) |
254 { | 232 { |
255 ngx_pool_t *pool; | 233 ngx_pool_t *pool; |
256 #if (NGX_OLD_THREADS) | |
257 ngx_core_tls_t *tls; | |
258 | |
259 if (ngx_threaded) { | |
260 tls = ngx_thread_get_tls(ngx_core_tls_key); | |
261 pool = tls->pool; | |
262 | |
263 } else { | |
264 pool = ngx_pcre_pool; | |
265 } | |
266 | |
267 #else | |
268 | |
269 pool = ngx_pcre_pool; | 234 pool = ngx_pcre_pool; |
270 | |
271 #endif | |
272 | 235 |
273 if (pool) { | 236 if (pool) { |
274 return ngx_palloc(pool, size); | 237 return ngx_palloc(pool, size); |
275 } | 238 } |
276 | 239 |