aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support/sync_posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/support/sync_posix.c')
-rw-r--r--src/core/support/sync_posix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/support/sync_posix.c b/src/core/support/sync_posix.c
index 39c96feb13..d6a0f7c325 100644
--- a/src/core/support/sync_posix.c
+++ b/src/core/support/sync_posix.c
@@ -59,8 +59,11 @@ void gpr_mu_unlock(gpr_mu* mu) {
}
int gpr_mu_trylock(gpr_mu* mu) {
- int err = pthread_mutex_trylock(mu);
+ int err;
+ GPR_TIMER_BEGIN("gpr_mu_trylock", 0);
+ err = pthread_mutex_trylock(mu);
GPR_ASSERT(err == 0 || err == EBUSY);
+ GPR_TIMER_END("gpr_mu_trylock", 0);
return err == 0;
}