This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 09/10] htl: Add C11 threads types definitions



On 14/01/2020 15:52, Samuel Thibault wrote:
> ---
>  sysdeps/htl/bits/thread-shared-types.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/sysdeps/htl/bits/thread-shared-types.h b/sysdeps/htl/bits/thread-shared-types.h
> index c280f2e182..819682a07b 100644
> --- a/sysdeps/htl/bits/thread-shared-types.h
> +++ b/sysdeps/htl/bits/thread-shared-types.h
> @@ -20,5 +20,18 @@
>  #define _THREAD_SHARED_TYPES_H 1
>  
>  #include <bits/pthreadtypes-arch.h>
> +#include <bits/types/struct___pthread_once.h>
> +
> +typedef int __tss_t;
> +typedef int __thrd_t;
> +
> +typedef union
> +{
> +  struct __pthread_once __data;
> +  int __align __ONCE_ALIGNMENT;
> +  char __size[__SIZEOF_PTHREAD_ONCE_T];
> +} __once_flag;
> +
> +#define __ONCE_FLAG_INIT { { __PTHREAD_ONCE_INIT } }
>  
>  #endif /* _THREAD_SHARED_TYPES_H  */
> 

Does Hurd really need both __align and __size flag? Its 
__pthread_once definition does not seem to require any
alignment constraint.

Rest looks good.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]