diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-03-05 21:08:01 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-03-05 21:08:01 +0000 |
commit | 0e8c7ebc65e2f5f59149fcd3ce63de4675d7c3d2 (patch) | |
tree | b0eed51495dafa67b5c82697b16904ee28c5012a /pjlib/src/pj/os_core_unix.c | |
parent | 837c92b0337f44eac5469411a454e3188dbe2574 (diff) |
Optimization on the log and add tracing on mutex trylock
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1042 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/os_core_unix.c')
-rw-r--r-- | pjlib/src/pj/os_core_unix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index a28af657..0dbe0afe 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -1123,6 +1123,9 @@ PJ_DEF(pj_status_t) pj_mutex_trylock(pj_mutex_t *mutex) PJ_CHECK_STACK(); PJ_ASSERT_RETURN(mutex, PJ_EINVAL); + PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s is trying", + pj_thread_this()->obj_name)); + status = pthread_mutex_trylock( &mutex->mutex ); if (status==0) { @@ -1138,6 +1141,9 @@ PJ_DEF(pj_status_t) pj_mutex_trylock(pj_mutex_t *mutex) PJ_LOG(6,(mutex->obj_name, "Mutex acquired by thread %s", pj_thread_this()->obj_name)); #endif + } else { + PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s's trylock() failed", + pj_thread_this()->obj_name)); } if (status==0) |