]> git.kaiwu.me - nginx.git/commitdiff
Removed pthread mutex / conditional variables debug messages.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 20 Jan 2017 18:14:18 +0000 (21:14 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 20 Jan 2017 18:14:18 +0000 (21:14 +0300)
These messages doesn't seem to be needed in practice and only make
debugging logs harder to read.

src/os/unix/ngx_thread_cond.c
src/os/unix/ngx_thread_mutex.c

index f5246966a673e6131638123cae86bb8e925f9828..2ad51b809e1c65de3ff7f1d46f6a3342c09ae2c5 100644 (file)
@@ -16,8 +16,6 @@ ngx_thread_cond_create(ngx_thread_cond_t *cond, ngx_log_t *log)
 
     err = pthread_cond_init(cond, NULL);
     if (err == 0) {
-        ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                       "pthread_cond_init(%p)", cond);
         return NGX_OK;
     }
 
@@ -33,8 +31,6 @@ ngx_thread_cond_destroy(ngx_thread_cond_t *cond, ngx_log_t *log)
 
     err = pthread_cond_destroy(cond);
     if (err == 0) {
-        ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                       "pthread_cond_destroy(%p)", cond);
         return NGX_OK;
     }
 
@@ -50,8 +46,6 @@ ngx_thread_cond_signal(ngx_thread_cond_t *cond, ngx_log_t *log)
 
     err = pthread_cond_signal(cond);
     if (err == 0) {
-        ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                       "pthread_cond_signal(%p)", cond);
         return NGX_OK;
     }
 
@@ -66,9 +60,6 @@ ngx_thread_cond_wait(ngx_thread_cond_t *cond, ngx_thread_mutex_t *mtx,
 {
     ngx_err_t  err;
 
-    ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                   "pthread_cond_wait(%p) enter", cond);
-
     err = pthread_cond_wait(cond, mtx);
 
 #if 0
@@ -76,8 +67,6 @@ ngx_thread_cond_wait(ngx_thread_cond_t *cond, ngx_thread_mutex_t *mtx,
 #endif
 
     if (err == 0) {
-        ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                       "pthread_cond_wait(%p) exit", cond);
         return NGX_OK;
     }
 
index a0ef693e72a498e73955dec3147dcb79c5dc6448..4886f49d7d867365a96936875df28daf5b2c3c74 100644 (file)
@@ -108,8 +108,6 @@ ngx_thread_mutex_create(ngx_thread_mutex_t *mtx, ngx_log_t *log)
                       "pthread_mutexattr_destroy() failed");
     }
 
-    ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                   "pthread_mutex_init(%p)", mtx);
     return NGX_OK;
 }
 
@@ -126,8 +124,6 @@ ngx_thread_mutex_destroy(ngx_thread_mutex_t *mtx, ngx_log_t *log)
         return NGX_ERROR;
     }
 
-    ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                   "pthread_mutex_destroy(%p)", mtx);
     return NGX_OK;
 }
 
@@ -137,9 +133,6 @@ ngx_thread_mutex_lock(ngx_thread_mutex_t *mtx, ngx_log_t *log)
 {
     ngx_err_t  err;
 
-    ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                   "pthread_mutex_lock(%p) enter", mtx);
-
     err = pthread_mutex_lock(mtx);
     if (err == 0) {
         return NGX_OK;
@@ -163,8 +156,6 @@ ngx_thread_mutex_unlock(ngx_thread_mutex_t *mtx, ngx_log_t *log)
 #endif
 
     if (err == 0) {
-        ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0,
-                       "pthread_mutex_unlock(%p) exit", mtx);
         return NGX_OK;
     }