diff options
author | Roland McGrath <roland@hack.frob.com> | 2012-05-25 13:35:08 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2012-05-25 13:41:03 -0700 |
commit | 5acf7263d52992ce4144e0a3b3644985b9e792b4 (patch) | |
tree | c128be190c1c3fb5a1987710033c016d5b881b70 /nptl/pthread_cond_destroy.c | |
parent | 8422c9a560e6e3c854739c8a13ecb1c6714f930f (diff) | |
download | glibc-5acf7263d52992ce4144e0a3b3644985b9e792b4.tar glibc-5acf7263d52992ce4144e0a3b3644985b9e792b4.tar.gz glibc-5acf7263d52992ce4144e0a3b3644985b9e792b4.tar.bz2 glibc-5acf7263d52992ce4144e0a3b3644985b9e792b4.zip |
Add systemtap static probe points in generic and x86_64 pthread code.
Diffstat (limited to 'nptl/pthread_cond_destroy.c')
-rw-r--r-- | nptl/pthread_cond_destroy.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/nptl/pthread_cond_destroy.c b/nptl/pthread_cond_destroy.c index 0f03b294b3..5f57b563c0 100644 --- a/nptl/pthread_cond_destroy.c +++ b/nptl/pthread_cond_destroy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2007 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. @@ -19,6 +19,7 @@ #include <errno.h> #include <shlib-compat.h> #include "pthreadP.h" +#include <stap-probe.h> int @@ -28,6 +29,8 @@ __pthread_cond_destroy (cond) int pshared = (cond->__data.__mutex == (void *) ~0l) ? LLL_SHARED : LLL_PRIVATE; + LIBC_PROBE (cond_destroy, 1, cond); + /* Make sure we are alone. */ lll_lock (cond->__data.__lock, pshared); @@ -50,13 +53,13 @@ __pthread_cond_destroy (cond) if (nwaiters >= (1 << COND_NWAITERS_SHIFT)) { /* Wake everybody on the associated mutex in case there are - threads that have been requeued to it. - Without this, pthread_cond_destroy could block potentially - for a long time or forever, as it would depend on other - thread's using the mutex. - When all threads waiting on the mutex are woken up, pthread_cond_wait - only waits for threads to acquire and release the internal - condvar lock. */ + threads that have been requeued to it. + Without this, pthread_cond_destroy could block potentially + for a long time or forever, as it would depend on other + thread's using the mutex. + When all threads waiting on the mutex are woken up, pthread_cond_wait + only waits for threads to acquire and release the internal + condvar lock. */ if (cond->__data.__mutex != NULL && cond->__data.__mutex != (void *) ~0l) { |