diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-08-24 17:43:32 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-08-24 17:43:32 +0300 |
commit | b84aa64dcbfb92d31cef10f2f45025a67f2418e4 (patch) | |
tree | bd7509540538801bdde233b24c0a130fbd6d757a /src/nxt_thread_time.c | |
parent | 8b4b52ae3b3c9400b3d7040a591203a0c1b74ec3 (diff) | |
download | unit-b84aa64dcbfb92d31cef10f2f45025a67f2418e4.tar.gz unit-b84aa64dcbfb92d31cef10f2f45025a67f2418e4.tar.bz2 |
Removed configure option --no-threads.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_thread_time.c | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/src/nxt_thread_time.c b/src/nxt_thread_time.c index 95c88fa3..d084af0a 100644 --- a/src/nxt_thread_time.c +++ b/src/nxt_thread_time.c @@ -30,14 +30,8 @@ */ -#if (NXT_THREADS) static void nxt_time_thread(void *data); static void nxt_thread_time_shared(nxt_monotonic_time_t *now); - -static nxt_bool_t nxt_use_shared_time = 0; -static volatile nxt_monotonic_time_t nxt_shared_time; -#endif - static void nxt_thread_realtime_update(nxt_thread_t *thr, nxt_monotonic_time_t *now); static u_char *nxt_thread_time_string_no_cache(nxt_thread_t *thr, @@ -48,45 +42,19 @@ static nxt_time_string_cache_t *nxt_thread_time_string_cache(nxt_thread_t *thr, static nxt_atomic_int_t nxt_gmtoff; +static nxt_bool_t nxt_use_shared_time = 0; +static volatile nxt_monotonic_time_t nxt_shared_time; void nxt_thread_time_update(nxt_thread_t *thr) { -#if (NXT_THREADS) - if (nxt_use_shared_time) { nxt_thread_time_shared(&thr->time.now); } else { nxt_monotonic_time(&thr->time.now); } - -#else - - nxt_monotonic_time(&thr->time.now); - - if (thr->time.signal >= 0) { - nxt_time_t s; - - /* - * Synchronous real time update: - * single-threaded mode without signal event support. - */ - - s = nxt_thread_time(thr); - - if (thr->time.signal == 0 && thr->time.last_localtime != s) { - /* Synchronous local time update in non-signal context. */ - - nxt_localtime(s, &thr->time.localtime); - thr->time.last_localtime = s; - - nxt_gmtoff = nxt_timezone(&thr->time.localtime); - } - } - -#endif } @@ -111,8 +79,6 @@ nxt_thread_time_free(nxt_thread_t *thr) } -#if (NXT_THREADS) - void nxt_time_thread_start(nxt_msec_t interval) { @@ -207,8 +173,6 @@ nxt_thread_time_shared(nxt_monotonic_time_t *now) } } -#endif - nxt_time_t nxt_thread_time(nxt_thread_t *thr) |