Removed pthread mutex / conditional variables debug messages.
These messages doesn't seem to be needed in practice and only make
debugging logs harder to read.
Maxim Dounin
5 years ago
15 | 15 |
|
16 | 16 |
err = pthread_cond_init(cond, NULL);
|
17 | 17 |
if (err == 0) {
|
18 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
19 | |
"pthread_cond_init(%p)", cond);
|
20 | 18 |
return NGX_OK;
|
21 | 19 |
}
|
22 | 20 |
|
|
32 | 30 |
|
33 | 31 |
err = pthread_cond_destroy(cond);
|
34 | 32 |
if (err == 0) {
|
35 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
36 | |
"pthread_cond_destroy(%p)", cond);
|
37 | 33 |
return NGX_OK;
|
38 | 34 |
}
|
39 | 35 |
|
|
49 | 45 |
|
50 | 46 |
err = pthread_cond_signal(cond);
|
51 | 47 |
if (err == 0) {
|
52 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
53 | |
"pthread_cond_signal(%p)", cond);
|
54 | 48 |
return NGX_OK;
|
55 | 49 |
}
|
56 | 50 |
|
|
65 | 59 |
{
|
66 | 60 |
ngx_err_t err;
|
67 | 61 |
|
68 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
69 | |
"pthread_cond_wait(%p) enter", cond);
|
70 | |
|
71 | 62 |
err = pthread_cond_wait(cond, mtx);
|
72 | 63 |
|
73 | 64 |
#if 0
|
|
75 | 66 |
#endif
|
76 | 67 |
|
77 | 68 |
if (err == 0) {
|
78 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
79 | |
"pthread_cond_wait(%p) exit", cond);
|
80 | 69 |
return NGX_OK;
|
81 | 70 |
}
|
82 | 71 |
|
107 | 107 |
"pthread_mutexattr_destroy() failed");
|
108 | 108 |
}
|
109 | 109 |
|
110 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
111 | |
"pthread_mutex_init(%p)", mtx);
|
112 | 110 |
return NGX_OK;
|
113 | 111 |
}
|
114 | 112 |
|
|
125 | 123 |
return NGX_ERROR;
|
126 | 124 |
}
|
127 | 125 |
|
128 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
129 | |
"pthread_mutex_destroy(%p)", mtx);
|
130 | 126 |
return NGX_OK;
|
131 | 127 |
}
|
132 | 128 |
|
|
135 | 131 |
ngx_thread_mutex_lock(ngx_thread_mutex_t *mtx, ngx_log_t *log)
|
136 | 132 |
{
|
137 | 133 |
ngx_err_t err;
|
138 | |
|
139 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
140 | |
"pthread_mutex_lock(%p) enter", mtx);
|
141 | 134 |
|
142 | 135 |
err = pthread_mutex_lock(mtx);
|
143 | 136 |
if (err == 0) {
|
|
162 | 155 |
#endif
|
163 | 156 |
|
164 | 157 |
if (err == 0) {
|
165 | |
ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
|
166 | |
"pthread_mutex_unlock(%p) exit", mtx);
|
167 | 158 |
return NGX_OK;
|
168 | 159 |
}
|
169 | 160 |
|