Home
last modified time | relevance | path

Searched refs:thr (Results 1 – 25 of 59) sorted by relevance

123

/unit/src/test/
H A Dnxt_tests.c29 nxt_thread_t *thr; in main() local
38 thr = nxt_thread(); in main()
39 thr->task = &task; in main()
58 nxt_rbtree1_mb_insert(thr); in main()
59 nxt_rbtree_mb_insert(thr); in main()
65 nxt_rbtree1_mb_delete(thr); in main()
66 nxt_rbtree_mb_delete(thr); in main()
73 if (nxt_random_test(thr) != NXT_OK) { in main()
141 if (nxt_gmtime_test(thr) != NXT_OK) { in main()
149 if (nxt_malloc_test(thr) != NXT_OK) { in main()
[all …]
H A Dnxt_tests.h36 nxt_int_t nxt_term_parse_test(nxt_thread_t *thr);
44 nxt_int_t nxt_rbtree_mb_start(nxt_thread_t *thr);
45 void nxt_rbtree_mb_insert(nxt_thread_t *thr);
46 void nxt_rbtree_mb_delete(nxt_thread_t *thr);
49 void nxt_rbtree1_mb_insert(nxt_thread_t *thr);
50 void nxt_rbtree1_mb_delete(nxt_thread_t *thr);
61 nxt_int_t nxt_gmtime_test(nxt_thread_t *thr);
62 nxt_int_t nxt_sprintf_test(nxt_thread_t *thr);
63 nxt_int_t nxt_malloc_test(nxt_thread_t *thr);
64 nxt_int_t nxt_utf8_test(nxt_thread_t *thr);
[all …]
H A Dnxt_gmtime_test.c26 nxt_gmtime_test(nxt_thread_t *thr) in nxt_gmtime_test() argument
32 nxt_thread_time_update(thr); in nxt_gmtime_test()
46 nxt_log_alert(thr->log, in nxt_gmtime_test()
55 nxt_thread_time_update(thr); in nxt_gmtime_test()
56 start = nxt_thread_monotonic_time(thr); in nxt_gmtime_test()
62 nxt_thread_time_update(thr); in nxt_gmtime_test()
63 end = nxt_thread_monotonic_time(thr); in nxt_gmtime_test()
69 nxt_thread_time_update(thr); in nxt_gmtime_test()
70 start = nxt_thread_monotonic_time(thr); in nxt_gmtime_test()
76 nxt_thread_time_update(thr); in nxt_gmtime_test()
[all …]
H A Dnxt_utf8_file_name_test.c12 static nxt_int_t nxt_utf8_file_name_test(nxt_thread_t *thr);
22 nxt_thread_t *thr; in main() local
30 thr = nxt_thread(); in main()
32 if (nxt_utf8_file_name_test(thr) != NXT_OK) { in main()
41 nxt_utf8_file_name_test(nxt_thread_t *thr) in nxt_utf8_file_name_test() argument
53 nxt_thread_time_update(thr); in nxt_utf8_file_name_test()
76 task.thread = thr; in nxt_utf8_file_name_test()
77 task.log = thr->log; in nxt_utf8_file_name_test()
84 nxt_log_alert(thr->log, "nxt_utf8_encode(%05uxD) failed", uc); in nxt_utf8_file_name_test()
106 nxt_log_alert(thr->log, "nxt_utf8_encode(%05uxD) failed", lc); in nxt_utf8_file_name_test()
[all …]
H A Dnxt_utf8_test.c43 nxt_utf8_overlong(nxt_thread_t *thr, u_char *overlong, size_t len) in nxt_utf8_overlong() argument
69 nxt_log_alert(thr->log, in nxt_utf8_overlong()
82 nxt_utf8_test(nxt_thread_t *thr) in nxt_utf8_test() argument
91 nxt_thread_time_update(thr); in nxt_utf8_test()
93 nxt_log_error(NXT_LOG_NOTICE, thr->log, "utf8 test started"); in nxt_utf8_test()
138 nxt_log_alert(thr->log, in nxt_utf8_test()
150 if (nxt_utf8_overlong(thr, utf8, 1) != NXT_OK) { in nxt_utf8_test()
157 if (nxt_utf8_overlong(thr, utf8, 2) != NXT_OK) { in nxt_utf8_test()
164 if (nxt_utf8_overlong(thr, utf8, 3) != NXT_OK) { in nxt_utf8_test()
185 nxt_log_alert(thr->log, "nxt_utf8_casecmp() failed"); in nxt_utf8_test()
[all …]
H A Dnxt_rbtree_test.c24 nxt_rbtree_test(nxt_thread_t *thr, nxt_uint_t n) in nxt_rbtree_test() argument
34 nxt_thread_time_update(thr); in nxt_rbtree_test()
64 nxt_thread_time_update(thr); in nxt_rbtree_test()
65 start = nxt_thread_monotonic_time(thr); in nxt_rbtree_test()
108 nxt_thread_time_update(thr); in nxt_rbtree_test()
109 end = nxt_thread_monotonic_time(thr); in nxt_rbtree_test()
203 nxt_rbtree_mb_start(nxt_thread_t *thr) in nxt_rbtree_mb_start() argument
235 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_rbtree_mb_start()
243 nxt_rbtree_mb_insert(nxt_thread_t *thr) in nxt_rbtree_mb_insert() argument
255 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_rbtree_mb_insert()
[all …]
H A Dnxt_lvlhsh_test.c133 nxt_thread_time_update(thr); in nxt_lvlhsh_test()
134 start = nxt_thread_monotonic_time(thr); in nxt_lvlhsh_test()
143 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_lvlhsh_test()
148 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_lvlhsh_test()
185 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_lvlhsh_test()
205 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_lvlhsh_test()
211 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_lvlhsh_test()
236 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_lvlhsh_test()
242 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_lvlhsh_test()
256 nxt_thread_time_update(thr); in nxt_lvlhsh_test()
[all …]
H A Dnxt_mp_test.c12 nxt_mp_test(nxt_thread_t *thr, nxt_uint_t runs, nxt_uint_t nblocks, in nxt_mp_test() argument
27 nxt_thread_time_update(thr); in nxt_mp_test()
28 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_mp_test()
66 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_mp_test()
78 nxt_log_error(NXT_LOG_NOTICE, thr->log, "mem pool is not empty"); in nxt_mp_test()
86 nxt_thread_time_update(thr); in nxt_mp_test()
87 nxt_log_error(NXT_LOG_NOTICE, thr->log, "mem pool test passed"); in nxt_mp_test()
H A Dnxt_rbtree1_test.c64 nxt_thread_time_update(thr); in nxt_rbtree1_test()
92 nxt_thread_time_update(thr); in nxt_rbtree1_test()
93 start = nxt_thread_monotonic_time(thr); in nxt_rbtree1_test()
132 nxt_thread_time_update(thr); in nxt_rbtree1_test()
133 end = nxt_thread_monotonic_time(thr); in nxt_rbtree1_test()
265 nxt_rbtree1_mb_start(nxt_thread_t *thr) in nxt_rbtree1_mb_start() argument
297 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_rbtree1_mb_start()
305 nxt_rbtree1_mb_insert(nxt_thread_t *thr) in nxt_rbtree1_mb_insert() argument
317 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_rbtree1_mb_insert()
323 nxt_rbtree1_mb_delete(nxt_thread_t *thr) in nxt_rbtree1_mb_delete() argument
[all …]
H A Dnxt_malloc_test.c22 nxt_malloc_run_test(nxt_thread_t *thr, nxt_malloc_size_t *last, size_t size, in nxt_malloc_run_test() argument
66 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_malloc_run_test()
85 nxt_malloc_test(nxt_thread_t *thr) in nxt_malloc_test() argument
91 nxt_log_error(NXT_LOG_NOTICE, thr->log, "malloc test started"); in nxt_malloc_test()
96 last = nxt_malloc_run_test(thr, last, size, TIMES); in nxt_malloc_test()
103 last = nxt_malloc_run_test(thr, last, size, TIMES / 4); in nxt_malloc_test()
110 last = nxt_malloc_run_test(thr, last, size, TIMES / 16); in nxt_malloc_test()
117 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_malloc_test()
H A Dnxt_msec_diff_test.c28 nxt_msec_diff_test(nxt_thread_t *thr, nxt_msec_less_t less) in nxt_msec_diff_test() argument
32 nxt_thread_time_update(thr); in nxt_msec_diff_test()
37 nxt_log_alert(thr->log, in nxt_msec_diff_test()
44 nxt_log_error(NXT_LOG_NOTICE, thr->log, "msec diff test passed"); in nxt_msec_diff_test()
H A Dnxt_mem_zone_test.c12 nxt_mem_zone_test(nxt_thread_t *thr, nxt_uint_t runs, nxt_uint_t nblocks, in nxt_mem_zone_test() argument
22 nxt_thread_time_update(thr); in nxt_mem_zone_test()
23 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_mem_zone_test()
56 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_mem_zone_test()
70 nxt_thread_time_update(thr); in nxt_mem_zone_test()
71 nxt_log_error(NXT_LOG_NOTICE, thr->log, "mem zone test passed"); in nxt_mem_zone_test()
H A Dnxt_strverscmp_test.c19 nxt_strverscmp_test(nxt_thread_t *thr) in nxt_strverscmp_test() argument
53 nxt_thread_time_update(thr); in nxt_strverscmp_test()
83 nxt_log_alert(thr->log, in nxt_strverscmp_test()
90 nxt_log_error(NXT_LOG_NOTICE, thr->log, in nxt_strverscmp_test()
/unit/src/
H A Dnxt_thread_time.c67 tsc = thr->time.strings; in nxt_thread_time_free()
109 thr = nxt_thread(); in nxt_time_thread()
114 thr->time.signal = -1; in nxt_time_thread()
137 thr->time.now = now; in nxt_time_thread()
180 nxt_thread_realtime_update(thr, &thr->time.now); in nxt_thread_time()
189 nxt_thread_realtime_update(thr, &thr->time.now); in nxt_thread_realtime()
235 if (nxt_slow_path(thr == NULL || thr->time.no_cache)) { in nxt_thread_time_string()
251 nxt_thread_realtime_update(thr, &thr->time.now); in nxt_thread_time_string()
361 if (thr == NULL || thr->time.signal <= 0) { in nxt_thread_time_string_no_cache()
415 thr->time.no_cache = 1; in nxt_thread_time_string_cache()
[all …]
H A Dnxt_thread.c112 nxt_log_debug(thr->log, "thread trampoline: %PH", thr->handle); in nxt_thread_trampoline()
120 thr->link = link; in nxt_thread_trampoline()
135 nxt_thread_exit(thr); in nxt_thread_trampoline()
144 nxt_thread_t *thr; in nxt_thread_init() local
148 thr = nxt_thread(); in nxt_thread_init()
165 return thr; in nxt_thread_init()
172 nxt_thread_t *thr; in nxt_thread_time_cleanup() local
174 thr = data; in nxt_thread_time_cleanup()
190 link = thr->link; in nxt_thread_exit()
191 thr->link = NULL; in nxt_thread_exit()
[all …]
H A Dnxt_thread_time.h64 NXT_EXPORT void nxt_thread_time_update(nxt_thread_t *thr);
65 void nxt_thread_time_free(nxt_thread_t *thr);
66 NXT_EXPORT nxt_time_t nxt_thread_time(nxt_thread_t *thr);
67 NXT_EXPORT nxt_realtime_t *nxt_thread_realtime(nxt_thread_t *thr);
68 NXT_EXPORT u_char *nxt_thread_time_string(nxt_thread_t *thr,
73 #define nxt_thread_monotonic_time(thr) \ argument
74 (thr)->time.now.monotonic
79 #define nxt_thread_time_debug_update(thr) \ argument
80 nxt_thread_time_update(thr)
84 #define nxt_thread_time_debug_update(thr) argument
H A Dnxt_thread_cond.c63 nxt_thread_t *thr; in nxt_thread_cond_wait() local
67 thr = nxt_thread(); in nxt_thread_cond_wait()
70 nxt_log_debug(thr->log, "pthread_cond_wait(%p) enter", cond); in nxt_thread_cond_wait()
74 nxt_thread_time_update(thr); in nxt_thread_cond_wait()
77 nxt_log_debug(thr->log, "pthread_cond_wait(%p) exit", cond); in nxt_thread_cond_wait()
81 nxt_log_alert(thr->log, "pthread_cond_wait() failed %E", err); in nxt_thread_cond_wait()
84 nxt_log_debug(thr->log, "pthread_cond_timedwait(%p, %N) enter", in nxt_thread_cond_wait()
87 now = nxt_thread_realtime(thr); in nxt_thread_cond_wait()
95 nxt_thread_time_update(thr); in nxt_thread_cond_wait()
98 nxt_log_debug(thr->log, "pthread_cond_timedwait(%p) exit: %d", in nxt_thread_cond_wait()
[all …]
H A Dnxt_cyassl.c75 nxt_thread_t *thr; in nxt_cyassl_start() local
84 thr = nxt_thread(); in nxt_cyassl_start()
111 nxt_thread_t *thr; in nxt_cyassl_server_init() local
113 thr = nxt_thread(); in nxt_cyassl_server_init()
246 nxt_thread_t *thr; in nxt_cyassl_io_recv() local
250 thr = nxt_thread(); in nxt_cyassl_io_recv()
274 nxt_thread_t *thr; in nxt_cyassl_io_send() local
278 thr = nxt_thread(); in nxt_cyassl_io_send()
314 nxt_thread_time_debug_update(thr); in nxt_cyassl_conn_handshake()
319 nxt_cyassl_conn_io_read(thr, c, data); in nxt_cyassl_conn_handshake()
[all …]
H A Dnxt_gnutls.c126 nxt_thread_t *thr; in nxt_gnutls_time() local
128 thr = nxt_thread(); in nxt_gnutls_time()
131 t = (time_t) nxt_thread_time(thr); in nxt_gnutls_time()
148 nxt_thread_t *thr; in nxt_gnutls_server_init() local
166 thr = nxt_thread(); in nxt_gnutls_server_init()
355 nxt_thread_t *thr; in nxt_gnutls_pull() local
359 thr = nxt_thread(); in nxt_gnutls_pull()
376 nxt_thread_t *thr; in nxt_gnutls_push() local
380 thr = nxt_thread(); in nxt_gnutls_push()
402 nxt_thread_t *thr; in nxt_gnutls_vec_push() local
[all …]
H A Dnxt_thread_log.h40 #define nxt_thread_debug(thr) \ argument
41 nxt_thread_t *thr = nxt_thread()
46 #define nxt_thread_debug(thr) argument
54 nxt_thread_t *thr; in nxt_thread_log() local
56 thr = nxt_thread(); in nxt_thread_log()
57 return thr->log; in nxt_thread_log()
H A Dnxt_semaphore.c80 nxt_thread_t *thr; in nxt_sem_wait() local
84 thr = nxt_thread(); in nxt_sem_wait()
87 nxt_log_debug(thr->log, "sem_wait(%p) enter", sem); in nxt_sem_wait()
94 nxt_thread_time_update(thr); in nxt_sem_wait()
109 nxt_log_alert(thr->log, "sem_wait(%p) failed %E", sem, err); in nxt_sem_wait()
117 nxt_log_debug(thr->log, "sem_trywait(%p) enter", sem); in nxt_sem_wait()
130 nxt_log_debug(thr->log, "sem_timedwait(%p, %N) enter", sem, timeout); in nxt_sem_wait()
132 now = nxt_thread_realtime(thr); in nxt_sem_wait()
142 nxt_thread_time_update(thr); in nxt_sem_wait()
152 nxt_log_debug(thr->log, "sem_timedwait(%p) exit: %d", sem, err); in nxt_sem_wait()
[all …]
H A Dnxt_thread_pool.c117 nxt_thread_t *thr; in nxt_thread_pool_start() local
121 thr = nxt_thread(); in nxt_thread_pool_start()
123 tp->main = thr->handle; in nxt_thread_pool_start()
124 tp->task.thread = thr; in nxt_thread_pool_start()
135 nxt_thread_t *thr; in nxt_thread_pool_loop() local
140 thr = nxt_thread(); in nxt_thread_pool_loop()
169 nxt_thread_t *thr; in nxt_thread_pool_wait() local
174 thr = nxt_thread(); in nxt_thread_pool_wait()
197 nxt_thread_exit(thr); in nxt_thread_pool_wait()
232 nxt_thread_t *thr; in nxt_thread_pool_destroy() local
[all …]
H A Dnxt_thread_mutex.c153 nxt_thread_debug(thr); in nxt_thread_mutex_trylock()
155 nxt_log_debug(thr->log, "pthread_mutex_trylock(%p) enter", mtx); in nxt_thread_mutex_trylock()
163 nxt_log_debug(thr->log, "pthread_mutex_trylock(%p) failed", mtx); in nxt_thread_mutex_trylock()
177 nxt_thread_t *thr; in nxt_thread_mutex_unlock() local
181 thr = nxt_thread(); in nxt_thread_mutex_unlock()
182 nxt_thread_time_update(thr); in nxt_thread_mutex_unlock()
185 nxt_log_debug(thr->log, "pthread_mutex_unlock(%p) exit", mtx); in nxt_thread_mutex_unlock()
189 nxt_log_alert(thr->log, "pthread_mutex_unlock() failed %E", err); in nxt_thread_mutex_unlock()
H A Dnxt_signal.c93 nxt_thread_t *thr; in nxt_signal_handler() local
95 thr = nxt_thread(); in nxt_signal_handler()
98 thr->time.signal++; in nxt_signal_handler()
100 nxt_thread_time_update(thr); in nxt_signal_handler()
104 nxt_event_engine_signal(thr->engine, signo); in nxt_signal_handler()
106 thr->time.signal--; in nxt_signal_handler()
157 nxt_thread_t *thr; in nxt_signal_thread() local
162 thr = nxt_thread(); in nxt_signal_thread()
169 nxt_thread_time_update(thr); in nxt_signal_thread()
H A Dnxt_polarssl.c22 static void nxt_polarssl_conn_init(nxt_thread_t *thr, nxt_ssltls_conf_t *conf,
38 nxt_thread_t *thr; in nxt_polarssl_server_init() local
41 thr = nxt_thread(); in nxt_polarssl_server_init()
52 nxt_polarssl_log_error(NXT_LOG_ALERT, thr->log, n, "ssl_init() failed"); in nxt_polarssl_server_init()
63 nxt_polarssl_log_error(NXT_LOG_ALERT, thr->log, n, in nxt_polarssl_server_init()
73 nxt_polarssl_log_error(NXT_LOG_ALERT, thr->log, n, in nxt_polarssl_server_init()
94 nxt_polarssl_conn_init(nxt_thread_t *thr, nxt_ssltls_conf_t *conf, in nxt_polarssl_conn_init() argument

123