Home
last modified time | relevance | path

Searched refs:tsd (Results 1 – 2 of 2) sorted by relevance

/unit/src/
H A Dnxt_thread.h33 #define nxt_thread_extern_data(type, tsd) \ argument
34 NXT_EXPORT extern __thread type tsd
36 #define nxt_thread_declare_data(type, tsd) \ argument
37 __thread type tsd
39 #define nxt_thread_init_data(tsd) argument
41 #define nxt_thread_get_data(tsd) \ argument
42 &tsd
66 #define nxt_thread_extern_data(type, tsd) \ argument
67 NXT_EXPORT extern nxt_thread_specific_data_t tsd
72 NXT_EXPORT void nxt_thread_init_data(nxt_thread_specific_data_t tsd);
[all …]
H A Dnxt_thread.c20 nxt_thread_init_data(nxt_thread_specific_data_t tsd) in nxt_thread_init_data() argument
26 while ((nxt_atomic_int_t) tsd->key < 0) { in nxt_thread_init_data()
32 if (nxt_atomic_cmp_set(&tsd->key, -1, -2)) { in nxt_thread_init_data()
40 tsd->key = (nxt_atomic_t) key; in nxt_thread_init_data()
42 nxt_main_log_debug("pthread_key_create(): %A", tsd->key); in nxt_thread_init_data()
46 if (pthread_getspecific((pthread_key_t) tsd->key) != NULL) { in nxt_thread_init_data()
50 p = nxt_zalloc(tsd->size); in nxt_thread_init_data()
55 err = pthread_setspecific((pthread_key_t) tsd->key, p); in nxt_thread_init_data()
60 nxt_main_log_alert("pthread_setspecific(%A) failed %E", tsd->key, err); in nxt_thread_init_data()