diff mbox

nptl: update default pthread-offsets.h

Message ID mvmpneskjhw.fsf@suse.de
State New
Headers show

Commit Message

Andreas Schwab Feb. 5, 2020, 5:54 p.m. UTC
Remove unused definitions, and correct __PTHREAD_RWLOCK_FLAGS_OFFSET for
__WORDSIZE == 64.
---
 sysdeps/nptl/pthread-offsets.h | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

Comments

Adhemerval Zanella Feb. 5, 2020, 6:17 p.m. UTC | #1
On 05/02/2020 14:54, Andreas Schwab wrote:
> Remove unused definitions, and correct __PTHREAD_RWLOCK_FLAGS_OFFSET for
> __WORDSIZE == 64.

LGTM, thanks for catching it.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/nptl/pthread-offsets.h | 22 ++++++----------------
>  1 file changed, 6 insertions(+), 16 deletions(-)
> 
> diff --git a/sysdeps/nptl/pthread-offsets.h b/sysdeps/nptl/pthread-offsets.h
> index a399608aa1..3d9c51783d 100644
> --- a/sysdeps/nptl/pthread-offsets.h
> +++ b/sysdeps/nptl/pthread-offsets.h
> @@ -1,26 +1,16 @@
>  #include <bits/wordsize.h>
>  
>  /* These values are based on internal generic types from
> -   mutex-internal.h and rwlock-internal.h.  */
> +   bits/struct_mutex.h and bits/struct_rwlock.h.  */
>  
>  #if __WORDSIZE == 64
> -# define __PTHREAD_MUTEX_NUSERS_OFFSET          12
> -# define __PTHREAD_MUTEX_KIND_OFFSET            16
> -# define __PTHREAD_MUTEX_SPINS_OFFSET           20
> -# define __PTHREAD_MUTEX_LIST_OFFSET            24
> +# define __PTHREAD_MUTEX_KIND_OFFSET		16
>  #else
> -# define __PTHREAD_MUTEX_NUSERS_OFFSET          16
> -# define __PTHREAD_MUTEX_KIND_OFFSET            12
> -# define __PTHREAD_MUTEX_SPINS_OFFSET           20
> -# define __PTHREAD_MUTEX_LIST_OFFSET            20
> +# define __PTHREAD_MUTEX_KIND_OFFSET		12
>  #endif
>  
> -#if __WORDSIZE == 64
> -# define __PTHREAD_RWLOCK_FLAGS_OFFSET          48
> +#if __BYTE_ORDER == __BIG_ENDIAN
> +# define __PTHREAD_RWLOCK_FLAGS_OFFSET		27
>  #else
> -# if __BYTE_ORDER == __BIG_ENDIAN
> -#  define __PTHREAD_RWLOCK_FLAGS_OFFSET         27
> -# else
> -#  define __PTHREAD_RWLOCK_FLAGS_OFFSET         24
> -# endif
> +# define __PTHREAD_RWLOCK_FLAGS_OFFSET		24
>  #endif
>
diff mbox

Patch

diff --git a/sysdeps/nptl/pthread-offsets.h b/sysdeps/nptl/pthread-offsets.h
index a399608aa1..3d9c51783d 100644
--- a/sysdeps/nptl/pthread-offsets.h
+++ b/sysdeps/nptl/pthread-offsets.h
@@ -1,26 +1,16 @@ 
 #include <bits/wordsize.h>
 
 /* These values are based on internal generic types from
-   mutex-internal.h and rwlock-internal.h.  */
+   bits/struct_mutex.h and bits/struct_rwlock.h.  */
 
 #if __WORDSIZE == 64
-# define __PTHREAD_MUTEX_NUSERS_OFFSET          12
-# define __PTHREAD_MUTEX_KIND_OFFSET            16
-# define __PTHREAD_MUTEX_SPINS_OFFSET           20
-# define __PTHREAD_MUTEX_LIST_OFFSET            24
+# define __PTHREAD_MUTEX_KIND_OFFSET		16
 #else
-# define __PTHREAD_MUTEX_NUSERS_OFFSET          16
-# define __PTHREAD_MUTEX_KIND_OFFSET            12
-# define __PTHREAD_MUTEX_SPINS_OFFSET           20
-# define __PTHREAD_MUTEX_LIST_OFFSET            20
+# define __PTHREAD_MUTEX_KIND_OFFSET		12
 #endif
 
-#if __WORDSIZE == 64
-# define __PTHREAD_RWLOCK_FLAGS_OFFSET          48
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define __PTHREAD_RWLOCK_FLAGS_OFFSET		27
 #else
-# if __BYTE_ORDER == __BIG_ENDIAN
-#  define __PTHREAD_RWLOCK_FLAGS_OFFSET         27
-# else
-#  define __PTHREAD_RWLOCK_FLAGS_OFFSET         24
-# endif
+# define __PTHREAD_RWLOCK_FLAGS_OFFSET		24
 #endif