This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Get rid of __LT_SPINLOCK_INIT
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 17 Mar 2014 10:58:49 -0300
- Subject: Re: [PATCH] Get rid of __LT_SPINLOCK_INIT
- Authentication-results: sourceware.org; auth=none
- References: <20140317135545 dot GM1850 at spoyarek dot pnq dot redhat dot com>
On 17-03-2014 10:55, Siddhesh Poyarekar wrote:
> Hi,
>
> We got rid of LinuxThreads in 2005, but we didn't remove
> __LT_SPINLOCK_INIT back then. Do it now.
>
> Siddhesh
>
> * nptl/sysdeps/pthread/bits/libc-lockP.h [defined NOT_IN_libc
> && !defined IS_IN_libpthread && __LT_SPINNOCK_INIT != 0]:
> Remove.
>
> diff --git a/nptl/sysdeps/pthread/bits/libc-lockP.h b/nptl/sysdeps/pthread/bits/libc-lockP.h
> index bacc678..ec20271 100644
> --- a/nptl/sysdeps/pthread/bits/libc-lockP.h
> +++ b/nptl/sysdeps/pthread/bits/libc-lockP.h
> @@ -78,13 +78,8 @@ typedef pthread_key_t __libc_key_t;
> CLASS __libc_lock_t NAME = LLL_LOCK_INITIALIZER;
> # endif
> #else
> -# if __LT_SPINLOCK_INIT == 0
> -# define __libc_lock_define_initialized(CLASS,NAME) \
> +# define __libc_lock_define_initialized(CLASS,NAME) \
> CLASS __libc_lock_t NAME;
> -# else
> -# define __libc_lock_define_initialized(CLASS,NAME) \
> - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
> -# endif
> #endif
>
> #define __libc_rwlock_define_initialized(CLASS,NAME) \
I'm ok with this patch (In fact I was about to send this patch too).