From: Roland McGrath Date: Thu, 1 May 2014 20:08:30 +0000 (-0700) Subject: Deconditionalize use of LLL_LOCK_INITIALIZER in bits/libc-lock.h. X-Git-Tag: upstream/2.30~7558 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c727f0325376e202d095be718daf64661409e499;p=external%2Fglibc.git Deconditionalize use of LLL_LOCK_INITIALIZER in bits/libc-lock.h. --- diff --git a/ChangeLog b/ChangeLog index b8988b9..2539d1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-05-01 Roland McGrath + + * nptl/sysdeps/pthread/bits/libc-lock.h + [_LIBC && (!NOT_IN_libc || IS_IN_libpthread)] + (__libc_lock_define_initialized_recursive): Always define using + initializer. Modern compilers treat uninitialized (implicit zero) and + explicit zero initializers the same (i.e. put the datum in bss). + 2014-05-01 Andreas Schwab * nscd/nscd-client.h: Include . diff --git a/nptl/sysdeps/pthread/bits/libc-lock.h b/nptl/sysdeps/pthread/bits/libc-lock.h index cddf11a..532cf2c 100644 --- a/nptl/sysdeps/pthread/bits/libc-lock.h +++ b/nptl/sysdeps/pthread/bits/libc-lock.h @@ -48,13 +48,8 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; /* Define an initialized recursive lock variable NAME with storage class CLASS. */ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) -# if LLL_LOCK_INITIALIZER == 0 -# define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_recursive_t NAME; -# else -# define __libc_lock_define_initialized_recursive(CLASS,NAME) \ +# define __libc_lock_define_initialized_recursive(CLASS, NAME) \ CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; -# endif # define _LIBC_LOCK_RECURSIVE_INITIALIZER \ { LLL_LOCK_INITIALIZER, 0, NULL } #else