diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-06-27 22:01:57 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-06-27 22:01:57 +0400 |
commit | c02473048cee372cb8644e1f2d566431781074d2 (patch) | |
tree | 689654cd7b37636279b5587ddd3b45ad6bddbd3c /src/core/ngx_times.h | |
parent | b1af9bbcabf1bdbe119366971a2d0f6c3f8f595d (diff) |
nginx-0.0.7-2004-06-27-22:01:57 import
Diffstat (limited to 'src/core/ngx_times.h')
-rw-r--r-- | src/core/ngx_times.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/core/ngx_times.h b/src/core/ngx_times.h index 8fdf685df..1fb712d44 100644 --- a/src/core/ngx_times.h +++ b/src/core/ngx_times.h @@ -7,17 +7,27 @@ void ngx_time_init(); -#if (NGX_THREADS) -ngx_int_t ngx_time_mutex_init(ngx_log_t *log); -#endif void ngx_time_update(time_t s); size_t ngx_http_time(u_char *buf, time_t t); void ngx_gmtime(time_t t, ngx_tm_t *tp); -#define ngx_time() ngx_cached_time +#if (NGX_THREADS) +ngx_int_t ngx_time_mutex_init(ngx_log_t *log); +#endif + +#if (NGX_THREADS && (TIME_T_SIZE > SIG_ATOMIC_T_SIZE)) + +#define ngx_time() *ngx_cached_time +extern volatile time_t *ngx_cached_time; +#else +#define ngx_time() ngx_cached_time extern volatile time_t ngx_cached_time; + +#endif + + extern volatile ngx_str_t ngx_cached_err_log_time; extern volatile ngx_str_t ngx_cached_http_time; extern volatile ngx_str_t ngx_cached_http_log_time; |