This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] New condvar implementation that provides stronger ordering guarantees.
- From: Torvald Riegel <triegel at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, GLIBC Devel <libc-alpha at sourceware dot org>, David Miller <davem at davemloft dot net>, Darren Hart <dvhart at infradead dot org>
- Date: Mon, 02 Jan 2017 15:47:30 +0100
- Subject: Re: [PATCH] New condvar implementation that provides stronger ordering guarantees.
- Authentication-results: sourceware.org; auth=none
- References: <1464268895.17104.14.camel@localhost.localdomain> <1465937639.31784.7.camel@localhost.localdomain> <696ddced-4efa-62ac-9fb5-01022b0437e8@redhat.com> <alpine.DEB.2.20.1612311732140.27227@digraph.polyomino.org.uk>
On Sat, 2016-12-31 at 17:37 +0000, Joseph Myers wrote:
> In addition to hppa (as expected), it appears the build is broken for
> sparcv9 (previous discussion said it was broken for pre-v9, did the
> expected breakage change as a result of other sparc changes?).
I had initially left sparc pthreadtypes.h untouched because I assumed
sparc would do something (eg, have proper atomics availabe for all sparc
variants) -- and then failed to make some decision regarding sparc
before commiting the new condvar. The attached patch just adds the new
definitions to sparc's pthreadtypes.h, which should fix your build
problem. Can you give it a try?
Also, while we're at it, could you please have a look at the change to
aarch64 pthread_cond_t introduced with the new condvar? I applied this
change:
- long int __align;
+ __extension__ long long int __align;
which seemed fine because the previous struct definition also had long
long int fields. Is this okay? (Same for ia64.)
commit 62210e7eb1b270c72c2ee61a14015285cd817262
Author: Torvald Riegel <triegel@redhat.com>
Date: Mon Jan 2 15:39:14 2017 +0100
Fix pthread_cond_t on sparc for new condvar.
* sysdeps/sparc/nptl/bits/pthreadtypes.h (pthread_cond_t): Adapt to
new condvar.
diff --git a/sysdeps/sparc/nptl/bits/pthreadtypes.h b/sysdeps/sparc/nptl/bits/pthreadtypes.h
index ebef53a..5685d95 100644
--- a/sysdeps/sparc/nptl/bits/pthreadtypes.h
+++ b/sysdeps/sparc/nptl/bits/pthreadtypes.h
@@ -122,14 +122,27 @@ 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;
+ };
+ unsigned int __g_refs[2];
+ unsigned int __g_size[2];
+ unsigned int __g1_orig_size;
+ unsigned int __wrefs;
+ unsigned int __g_signals[2];
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
__extension__ long long int __align;