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

Samuel Thibault samuel.thibault@ens-lyon.org
Mon Jan 20 21:16:00 GMT 2020


Adhemerval Zanella, le lun. 20 janv. 2020 16:08:03 -0300, a ecrit:
> On 14/01/2020 15:52, Samuel Thibault wrote:
> > 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 @@
> > +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?

I am here reproducing what we have for mtx_t and cnd_t. I agree that the
current structure does not need more than int alignment, but we could
need more than this in the future for some archs.

Samuel



More information about the Libc-alpha mailing list