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_wait.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_wait.c')
-rw-r--r-- | nptl/pthread_cond_wait.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c index c05d06c143..35505d9a19 100644 --- a/nptl/pthread_cond_wait.c +++ b/nptl/pthread_cond_wait.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003,2004,2006,2007,2011 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003. @@ -24,6 +24,7 @@ #include <pthreadP.h> #include <shlib-compat.h> +#include <stap-probe.h> struct _condvar_cleanup_buffer @@ -43,7 +44,7 @@ __condvar_cleanup (void *arg) (struct _condvar_cleanup_buffer *) arg; unsigned int destroying; int pshared = (cbuffer->cond->__data.__mutex == (void *) ~0l) - ? LLL_SHARED : LLL_PRIVATE; + ? LLL_SHARED : LLL_PRIVATE; /* We are going to modify shared data. */ lll_lock (cbuffer->cond->__data.__lock, pshared); @@ -98,7 +99,9 @@ __pthread_cond_wait (cond, mutex) struct _condvar_cleanup_buffer cbuffer; int err; int pshared = (cond->__data.__mutex == (void *) ~0l) - ? LLL_SHARED : LLL_PRIVATE; + ? LLL_SHARED : LLL_PRIVATE; + + LIBC_PROBE (cond_wait, 2, cond, mutex); /* Make sure we are alone. */ lll_lock (cond->__data.__lock, pshared); |