This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] Unify pthread_spin_[try]lock implementations.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Maxim Kuvyrkov <maxim at codesourcery dot com>, Andrew Haley <aph at redhat dot com>, David Miller <davem at davemloft dot net>, "Joseph S. Myers" <joseph at codesourcery dot com>, Richard Sandiford <rdsandiford at googlemail dot com>, libc-ports at sourceware dot org, GLIBC Devel <libc-alpha at sourceware dot org>, Chris Metcalf <cmetcalf at tilera dot com>
- Date: Wed, 15 Aug 2012 10:10:42 -0700 (PDT)
- Subject: Re: [PATCH] Unify pthread_spin_[try]lock implementations.
- References: <Pine.LNX.4.64.1206282306320.20312@digraph.polyomino.org.uk> <65B470D2-4D01-4BA1-AEC5-A72C0006EA22@codesourcery.com> <20120711081441.73BB22C093@topped-with-meat.com> <20120711.012509.1325789838255235021.davem@davemloft.net> <4FFD3CD9.4030206@redhat.com> <84304C03-6A49-4263-9016-05486EDC0E98@codesourcery.com> <4FFD4114.9000806@redhat.com> <E1DB09C1-0E3E-4088-9793-C0CAB80B5084@codesourcery.com> <20120711112235.B28CA2C099@topped-with-meat.com> <7FBB4F87-9FF3-4239-818F-5A38C8094011@codesourcery.com> <20120725181300.DD1812C0B5@topped-with-meat.com> <36A2FFD8-0C98-4AB6-8C64-2EEC5CC67A63@codesourcery.com> <20120815162637.B74982C0F2@topped-with-meat.com> <BE128C9A-CABC-4E04-A48E-316EAE8E0C64@codesourcery.com> <502BD690.50501@redhat.com>
> It seems to me that SPIN_LOCK_READS_BETWEEN_CMPXCHG may have the
> property that varying it at runtime based on the characteristics of the
> particular chip running the application might be worthwhile.
Nothing prevents a machine from defining the macro to use a global variable
that is set by some machine-specific initialization code.