diff options
Diffstat (limited to 'nptl/pthread_mutex_timedlock.c')
-rw-r--r-- | nptl/pthread_mutex_timedlock.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c index b7f34d4fd2..52fa74c0dc 100644 --- a/nptl/pthread_mutex_timedlock.c +++ b/nptl/pthread_mutex_timedlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -23,6 +23,8 @@ #include <lowlevellock.h> #include <not-cancel.h> +#include <stap-probe.h> + int pthread_mutex_timedlock (mutex, abstime) @@ -33,6 +35,8 @@ pthread_mutex_timedlock (mutex, abstime) pid_t id = THREAD_GETMEM (THREAD_SELF, tid); int result = 0; + LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime); + /* We must not check ABSTIME here. If the thread does not block abstime must not be checked for a valid value. */ @@ -171,6 +175,8 @@ pthread_mutex_timedlock (mutex, abstime) ++mutex->__data.__count; + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); + return 0; } } @@ -241,6 +247,8 @@ pthread_mutex_timedlock (mutex, abstime) ++mutex->__data.__count; + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); + return 0; } } @@ -376,6 +384,8 @@ pthread_mutex_timedlock (mutex, abstime) ++mutex->__data.__count; + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); + return 0; } } @@ -476,6 +486,8 @@ pthread_mutex_timedlock (mutex, abstime) /* Record the ownership. */ mutex->__data.__owner = id; ++mutex->__data.__nusers; + + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex); } out: |