This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Userspace RCU library relicensed to LGPLv2.1
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Mathieu Desnoyers <mathieu dot desnoyers at polymtl dot ca>
- Cc: Jan Blunck <jblunck at suse dot de>, ltt-dev at lists dot casi dot polymtl dot ca, "Paul E. McKenney" <paulmck at linux dot vnet dot ibm dot com>, steven dot bennett at us dot ibm dot com, tech-board <tech-board at lists dot linux-foundation dot org>, Robert Wisniewski <bob at watson dot ibm dot com>, Evgeniy Polyakov <zbr at ioremap dot net>, Dominique Toupin <dominique dot toupin at ericsson dot com>, Jonathan Corbet <corbet at lwn dot net>, Jake Edge <jake at lwn dot net>, zbrown at tumblerings dot org, libc-alpha at sources dot redhat dot com
- Date: Thu, 14 May 2009 17:57:30 +0200
- Subject: Re: Userspace RCU library relicensed to LGPLv2.1
- References: <20090513204308.GA27340@Krystal> <20090514092738.GO17988@bolzano.suse.de> <20090514130639.GD21241@Krystal> <20090514134622.GT17988@bolzano.suse.de> <20090514140346.GB23866@Krystal>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, May 14, 2009 at 10:03:46AM -0400, Mathieu Desnoyers wrote:
> The gcc-friendly solution would be to add a
>
> type __sync_val_xchg(type *ptr, type value)
>
> primitive to gcc atomic ops.
How would that be different from __sync_lock_test_and_set?
The only drawback is that __sync_lock_test_and_set? is not a full barrier,
but only an acquire barrier (though on i386/x86_64 and a bunch of other
targets it makes no difference at all).
Jakub