~ubuntu-branches/ubuntu/lucid/libatomic-ops/lucid

« back to all changes in this revision

Viewing changes to src/atomic_ops/sysdeps/gcc/sparc.h

  • Committer: Bazaar Package Importer
  • Author(s): Ian Wienand
  • Date: 2006-10-16 09:45:29 UTC
  • mfrom: (2.1.4 dapper)
  • Revision ID: james.westby@ubuntu.com-20061016094529-r3bevpq5w6g3rv20
Tags: 1.1-4
* Closes: #322027, #338469 -- add 04_m68k.patch for M68K support, from
  Roman Zippel <zippel@linux-m68k.org>.  Add note in README.Debian about
  port.
* Change mainatiner address to my @debian.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
/* Non-ancient SPARCs provide compare-and-swap (casa).  */
20
20
/* We should make that available.                       */
21
21
 
22
 
#include "../atomic_load_store.h"
 
22
#include "../all_atomic_load_store.h"
23
23
 
24
24
/* Real SPARC code uses TSO:                            */
25
25
#include "../ordered_except_wr.h"
26
26
 
 
27
/* Test_and_set location is just a byte.                */
 
28
#include "../test_and_set_t_is_char.h"
 
29
 
27
30
AO_INLINE AO_TS_VAL_t
28
31
AO_test_and_set_full(volatile AO_TS_t *addr) {
29
32
  int oldval;
36
39
 
37
40
#define AO_HAVE_test_and_set_full
38
41
 
39
 
 
 
42
/* FIXME: This needs to be extended for SPARC v8 and v9.        */
 
43
/* SPARC V8 also has swap.  V9 has CAS.                         */
 
44
/* There are barriers like membar #LoadStore.                   */
 
45
/* CASA (32-bit) and CASXA(64-bit) instructions were            */
 
46
/* added in V9.                                                 */