This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH 2/2] sparc32: Use cas for atomic_* operations and use general pthread_barrier_wait
- From: David Miller <davem at davemloft dot net>
- To: andreas at gaisler dot com
- Cc: libc-alpha at sourceware dot org, adhemerval dot zanella at linaro dot org, carlos at redhat dot com, triegel at redhat dot com, software at gaisler dot com
- Date: Fri, 04 Nov 2016 14:37:10 -0400 (EDT)
- Subject: Re: [RFC][PATCH 2/2] sparc32: Use cas for atomic_* operations and use general pthread_barrier_wait
- Authentication-results: sourceware.org; auth=none
- References: <1478012867-6031-1-git-send-email-andreas@gaisler.com> <1478012867-6031-3-git-send-email-andreas@gaisler.com>
From: Andreas Larsson <andreas@gaisler.com>
Date: Tue, 1 Nov 2016 16:07:47 +0100
> This uses the CASA compare and swap with user space data access ASI 0xa
> that is present on many LEON3 and LEON4 systems and that is implied by
> gcc's -mcpu=leon3.
>
> The CASA instruction is used not only for atomic compare and exchange
> functions, but also atomic exchange functions and atomic write
> functions. This is to allow the OS kernel to emulate that instruction on
> systems where it is missing and to get atomicity between all atomic
> writing functions without having to resort to stop all CPU:s in an SMP
> system.
Ok, this is fine. I'll work on the instruction emulation code for the
kernel side.