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_mutex_unlock.c | |
parent | 8422c9a560e6e3c854739c8a13ecb1c6714f930f (diff) | |
download | glibc-5acf7263d52992ce4144e0a3b3644985b9e792b4.tar.gz |
Add systemtap static probe points in generic and x86_64 pthread code.
Diffstat (limited to 'nptl/pthread_mutex_unlock.c')
-rw-r--r-- | nptl/pthread_mutex_unlock.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c index 0f35f6203f..aa8ecbd583 100644 --- a/nptl/pthread_mutex_unlock.c +++ b/nptl/pthread_mutex_unlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005-2008, 2009 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. @@ -21,6 +21,7 @@ #include <stdlib.h> #include "pthreadP.h" #include <lowlevellock.h> +#include <stap-probe.h> static int internal_function @@ -49,6 +50,9 @@ __pthread_mutex_unlock_usercnt (mutex, decr) /* Unlock. */ lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)); + + LIBC_PROBE (mutex_release, 1, mutex); + return 0; } else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1)) @@ -271,6 +275,9 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr) PTHREAD_MUTEX_PSHARED (mutex)); int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + + LIBC_PROBE (mutex_release, 1, mutex); + return __pthread_tpp_change_priority (oldprio, -1); default: @@ -278,6 +285,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr) return EINVAL; } + LIBC_PROBE (mutex_release, 1, mutex); return 0; } |