Use the mutex member of the argumen in __libc_lock_*_recursive

This commit is contained in:
Siddhesh Poyarekar 2013-09-27 07:59:26 +05:30
parent f4518a17e3
commit c8886d0abf
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2013-09-27 Siddhesh Poyarekar <siddhesh@redhat.com>
* nptl/sysdeps/pthread/bits/libc-lock.h [_LIBC &&
(!NOT_IN_libc || IS_IN_libpthread)]
(__libc_lock_fini_recursive): Use the mutex member of the
argument.
(__libc_lock_trylock_recursive): Likewise.
(__libc_lock_unlock_recursive): Likewise.
2013-09-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/sh/stackguard-macros.h: New file.

View File

@ -87,7 +87,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
# define __libc_lock_fini_recursive(NAME) ((void) 0)
#else
# define __libc_lock_fini_recursive(NAME) \
__libc_maybe_call (__pthread_mutex_destroy, (&(NAME)), 0)
__libc_maybe_call (__pthread_mutex_destroy, (&(NAME).mutex), 0)
#endif
/* Lock the recursive named lock variable. */
@ -129,7 +129,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
})
#else
# define __libc_lock_trylock_recursive(NAME) \
__libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0)
__libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0)
#endif
/* Unlock the recursive named lock variable. */
@ -145,7 +145,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
} while (0)
#else
# define __libc_lock_unlock_recursive(NAME) \
__libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0)
__libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0)
#endif
/* Note that for I/O cleanup handling we are using the old-style