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] New condvar implementation that provides stronger ordering guarantees.


On 26/05/16 14:21, Torvald Riegel wrote:
> diff --git a/sysdeps/aarch64/nptl/bits/pthreadtypes.h b/sysdeps/aarch64/nptl/bits/pthreadtypes.h
> index 13984a7..87c4804 100644
> --- a/sysdeps/aarch64/nptl/bits/pthreadtypes.h
> +++ b/sysdeps/aarch64/nptl/bits/pthreadtypes.h
> @@ -90,17 +90,32 @@ typedef union
>  {
>    struct
>    {
> -    int __lock;
> -    unsigned int __futex;
> -    __extension__ unsigned long long int __total_seq;
> -    __extension__ unsigned long long int __wakeup_seq;
> -    __extension__ unsigned long long int __woken_seq;
> -    void *__mutex;
> -    unsigned int __nwaiters;
> -    unsigned int __broadcast_seq;
> +    __extension__ union
> +    {
> +      __extension__ unsigned long long int __wseq;
> +      struct {
> +	unsigned int __low;
> +	unsigned int __high;
> +      } __wseq32;
> +    };
> +    __extension__ union
> +    {
> +      __extension__ unsigned long long int __g1_start;
> +      struct {
> +	unsigned int __low;
> +	unsigned int __high;
> +      } __g1_start32;
> +    };

are these __low/__high members needed (i dont see them used)?
they may be misleading on bigendian targets.

the type definition seems to be similar across targets,
maybe it could be shared in some generic header?

> +    unsigned int __g_refs[2];
> +    unsigned int __g_size[2];
> +    unsigned int __g1_orig_size;
> +    unsigned int __wrefs;
> +    unsigned int __g_signals[2];
> +#define __PTHREAD_COND_CLOCK_MONOTONIC_MASK 2
> +#define __PTHREAD_COND_SHARED_MASK 1
>    } __data;
>    char __size[__SIZEOF_PTHREAD_COND_T];
> -  long int __align;
> +  __extension__ long long int __align;
>  } pthread_cond_t;
>  


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