Ivan Maidanski [Thu, 4 Aug 2011 18:49:51 +0000 (22:49 +0400)]
Fix compiler extra warnings.
* src/atomic_ops_stack.c (AO_stack_pop_explicit_aux_acquire): Remove
non-negative-value test for an unsigned value.
* src/atomic_ops_stack.h (AO_STACK_INITIALIZER): Add {} to match type
definition.
* tests/test_atomic.c (acqrel_thr): Fix code indentation.
* tests/test_atomic.c (test_and_set_thr): Print thread Id in case of error.
* tests/test_malloc.c (cons): Declare "i" local variable as unsigned (as it
is compared to another unsigned value).
* tests/test_malloc.c (check_list): Test upper bound as well, abort with the
appropriate message in case of mismatch.
* tests/test_malloc.c (run_one_test): Return "arg" parameter (to suppress
"unused parameter" compiler warning).
* tests/list_atomic.template (list_atomicXX): Remove "addr" local
variable (use "&val" instead); initialize "newval" and "oldval"
local variables; rename "tsaddr" local variable to "ts" one.
* tests/list_atomic.template (list_atomicXX): Fix
AO_test_and_setXX call (pass address instead of value).
* tests/list_atomic.template: Expand all tabs to spaces; remove
trailing spaces at EOLn.
* tests/run_parallel.inc: Ditto.
* tests/test_atomic.c: Ditto.
* tests/list_atomic.c: Regenerate.
* tests/run_parallel.inc (AO_PTRDIFF_T): New macro.
* tests/run_parallel.inc (tramp): Cast between pointer and integer
types via casting to AO_PTRDIFF_T.
* tests/test_atomic.c (add1sub1_thr, acqrel_thr): Ditto.
* tests/run_parallel.inc (run_parallel): Adjust printf format
specifiers for DWORD parameters.
* tests/test_stack.c: Skip test if no pthreads.
ivmai [Tue, 7 Jun 2011 16:57:06 +0000 (16:57 +0000)]
2011-06-07 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full, AO_load): Do not
define for pre-ARMv6 directly (revert part of the previous
commit).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set,
AO_test_and_set_full): Refine the comment.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set_full): Define
SWP-based implementation at the end of file (if none of
AO_test_and_set functions are defined previously).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set): Remove
SWP-based implementation (revert part of the previous commit).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_store): Remove redundant
definition at the file end (revert part of the previous commit).
ivmai [Tue, 7 Jun 2011 14:13:16 +0000 (14:13 +0000)]
2011-06-07 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/gcc/arm.h: Handle ARMv6M architecture.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set): Force "swp"
instruction usage (instead of ldrex/strex) if AO_FORCE_USE_SWP;
add a comment.
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Handle ARMv7EM architecture
(similar to ARMv7M).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set, AO_nop_full,
AO_load, AO_store): Define at the end of file (in case not defined
previously).
ivmai [Mon, 6 Jun 2011 20:28:43 +0000 (20:28 +0000)]
2011-06-06 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/gcc/arm.h (AO_THUMB_GO_ARM,
AO_THUMB_RESTORE_MODE): Use single-digit labels (to workaround
a bug in GCC v4.2.1 which reports "garbage following instruction"
otherwise).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_compare_and_swap): Use "IT"
instruction only for Thumb-2 mode.
ivmai [Mon, 6 Jun 2011 13:34:11 +0000 (13:34 +0000)]
2011-06-06 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/gcc/arm.h (AO_THUMB_GO_ARM,
AO_THUMB_RESTORE_MODE, AO_THUMB_SWITCH_CLOBBERS): Define as empty
for Thumb-2 mode.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_store, AO_test_and_set,
AO_fetch_and_add, AO_fetch_and_add1, AO_fetch_and_sub1,
AO_compare_and_swap, AO_compare_double_and_swap_double): Remove
unnecessary "memory" keyword from the list of clobbered registers
(revert part of the previous commit).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_compare_and_swap): Add
a comment for "IT" instruction.
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Don't define on the
architectures where unimplemented; add a comment; replace return
(in the loop) statement with break.
ivmai [Mon, 6 Jun 2011 09:04:58 +0000 (09:04 +0000)]
2011-06-06 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/gcc/arm.h (AO_THUMB_GO_ARM,
AO_THUMB_RESTORE_MODE, AO_THUMB_SWITCH_CLOBBERS): Define new
macro (to switch temporarily CPU mode to ARM in inline assembler
if compiling in the Thumb mode and to restore it back on leave).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full, AO_store,
AO_test_and_set, AO_fetch_and_add, AO_fetch_and_add1,
AO_fetch_and_sub1, AO_compare_and_swap, AO_test_and_set_full):
Enable compilation in the Thumb mode (use AO_THUMB_GO_ARM,
AO_THUMB_RESTORE_MODE and AO_THUMB_SWITCH_CLOBBERS macros).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_store, AO_test_and_set,
AO_fetch_and_add, AO_fetch_and_add1, AO_fetch_and_sub1,
AO_compare_and_swap, AO_compare_double_and_swap_double): Add
"memory" to the list of clobbered registers.
ivmai [Fri, 3 Jun 2011 13:25:31 +0000 (13:25 +0000)]
2011-06-03 Ivan Maidanski <ivmai@mail.ru>
* tests/test_malloc.c (run_one_test): Test AO_malloc() result
(if out of memory then print the message and abort).
* tests/test_stack.c (add_elements): Ditto.
ivmai [Wed, 1 Jun 2011 22:43:19 +0000 (22:43 +0000)]
2011-06-01 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double,
AO_HAVE_compare_double_and_swap_double): Define only starting from
ARMv6K.
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Fix function name in
assembler code; replace while (1) loop with "do-while".
ivmai [Wed, 1 Jun 2011 13:57:18 +0000 (13:57 +0000)]
2011-06-01 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/sunc/x86.h (AO_test_and_set_full):
Specify "%b0" (instead of "%0") in "xchg" instruction (to
workaround a bug in Sun C 5.11).
* src/atomic_ops/sysdeps/sunc/x86_64.h (AO_test_and_set_full):
Ditto.
ivmai [Mon, 30 May 2011 16:52:54 +0000 (16:52 +0000)]
2011-05-30 Ivan Maidanski <ivmai@mail.ru>
* configure.ac (PIC): Add workaround for GCC v3.4.6 which does not
define the corresponding macro.
* configure.ac: Don't check for GCC twice.
* configure: Regenerate.
* tests/test_malloc.c (DEFAULT_NTHREADS): New macro.
* tests/test_malloc.c (run_one_test): Refine printed message (in
case of HAVE_MMAP).
* tests/test_malloc.c (main): Use DEFAULT_NTHREADS.
* tests/test_stack.c (main): Cast AO_stack_pop() returned pointer.
* src/atomic_ops_malloc.c (USE_MMAP_ANON, GC_MMAP_FLAGS,
OPT_MAP_ANON): New macro.
* src/atomic_ops_malloc.c (get_mmaped): Pass -1 (instead of 0) as
file descriptor to mmap() if MAP_ANONYMOUS (same as for MAP_ANON).
* src/atomic_ops_malloc.c (get_mmaped): Use USE_MMAP_ANON,
GC_MMAP_FLAGS and OPT_MAP_ANON macros; reformat code; check open()
returned value.
ivmai [Sun, 13 Mar 2011 10:50:36 +0000 (10:50 +0000)]
2011-03-13 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/emul_cas.h: Fix a typo in a comment;
expand all tabs to spaces.
* src/atomic_ops/sysdeps/gcc/x86.h (AO_test_and_set_full):
Recognize AO_XCHGB_RET_WORD new macro (to workaround a bug).
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_test_and_set_full):
Ditto.
ivmai [Sat, 19 Feb 2011 20:10:41 +0000 (20:10 +0000)]
2011-02-19 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops.c: Include sys/time.h (to get timespec) for NaCl.
* src/atomic_ops_malloc.c (msb): Do the shift by 32 only once (in
a conditional expression) to prevent a compiler warning.
* src/atomic_ops_malloc.c: Expand all tabs to spaces; remove
trailing spaces at EOLn.
ivmai [Sat, 12 Feb 2011 14:14:00 +0000 (14:14 +0000)]
2011-02-09 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops.c (AO_USE_NO_SIGNALS, AO_USE_NANOSLEEP): New
macros.
* src/atomic_ops.c (AO_USE_WIN32_PTHREADS): Imply
AO_USE_NO_SIGNALS.
* src/atomic_ops.c: Don't include signal.h if AO_USE_NO_SIGNALS.
* src/atomic_ops.c: Include time.h if AO_USE_NANOSLEEP.
* src/atomic_ops.c (AO_locks, AO_pause): Reformat the code.
* src/atomic_ops.c (AO_pause): Use nanosleep() if
AO_USE_NANOSLEEP.
* src/atomic_ops.c (all_sigs, initialized,
AO_compare_and_swap_emulation,
AO_compare_double_and_swap_double_emulation): Use
AO_USE_NO_SIGNALS instead of AO_USE_WIN32_PTHREADS.
ivmai [Tue, 23 Nov 2010 20:10:26 +0000 (20:10 +0000)]
2010-11-23 Ivan Maidanski <ivmai@mail.ru> (really Michael Hope)
* src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_compare_and_swap):
Insert "it eq" just before "strexeq" (required for Thumb-2 mode,
ignored in ARM mode).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_compare_and_swap): Ditto.
2010-09-15 Ivan Maidanski <ivmai@mail.ru> (with input from Gregory Farnum)
* src/atomic_ops.h: Include armcc/arm_v6.h if __ARMCC__.
* src/atomic_ops.h: Include ibmc/powerpc.h if __IBMC__.
* src/atomic_ops.h: Define AO_GENERALIZE_TWICE if msftc/arm.h is
included.
* src/atomic_ops.h: Define AO_GENERALIZE_TWICE if AO_CAN_EMUL_CAS
is defined but emul_cas.h has not been included.
* src/atomic_ops/sysdeps/gcc/arm.h: Fix a typo.
ivmai [Sun, 30 May 2010 15:00:01 +0000 (15:00 +0000)]
2010-05-30 Ivan Maidanski <ivmai@mail.ru> (really Bradley Smith)
* src/atomic_ops/sysdeps/gcc/avr32.h (AO_test_and_set): Use
"register long" (instead of "int") for "ret" variable.
* src/atomic_ops/sysdeps/gcc/avr32.h (AO_test_and_set): Replace
with AO_test_and_set_full (same for AO_HAVE_test_and_set).
* src/atomic_ops/sysdeps/gcc/avr32.h (AO_compare_and_swap_full):
New function implemented.
ivmai [Fri, 19 Feb 2010 17:12:05 +0000 (17:12 +0000)]
2010-02-19 Ivan Maidanski <ivmai@mail.ru> (mostly really Patrick Marlier)
* src/atomic_ops/sysdeps/gcc/x86.h (AO_compare_and_swap_full):
Use __sync_bool_compare_and_swap() if AO_USE_SYNC_CAS_BUILTIN.
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_compare_and_swap_full):
Ditto.
* src/atomic_ops.h (AO_USE_SYNC_CAS_BUILTIN): New macro defined
if GCC v4.2+ or Intel compiler v11.1+ (only for amd64).
* src/atomic_ops.h: Include GCC-specific sysdeps files for Intel
compiler in GCC compatible mode (only for x86 and amd64).
ivmai [Thu, 18 Feb 2010 10:11:47 +0000 (10:11 +0000)]
2010-02-18 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_nop_full): Don't check
for AO_USE_PENTIUM4_INSTRS (since "mfence" (SSE2) is supported on
all x86_64/amd64 chips); remove the comment.
* src/atomic_ops/sysdeps/msftc/x86_64.h (AO_nop_full): Ditto.
* src/atomic_ops/sysdeps/msftc/x86_64.h (AO_nop_full): Define only
if AO_ASM_X64_AVAILABLE.
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_compare_and_swap_full):
Use built-in __sync_bool_compare_and_swap() if GCC v4.2+.
ivmai [Wed, 17 Feb 2010 19:28:28 +0000 (19:28 +0000)]
2010-02-17 Ivan Maidanski <ivmai@mail.ru> (really Patrick Marlier)
* src/atomic_ops/sysdeps/gcc/x86.h (AO_compare_and_swap_full,
AO_compare_double_and_swap_double_full): Use EAX for the result
since cmpxchg clobbers it.
* src/atomic_ops/sysdeps/sunc/x86.h (AO_compare_and_swap_full,
AO_compare_double_and_swap_double_full): Ditto.
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_compare_and_swap_full,
AO_compare_double_and_swap_double_full): Ditto.
* src/atomic_ops/sysdeps/sunc/x86_64.h (AO_compare_and_swap_full,
AO_compare_double_and_swap_double_full): Ditto.
ivmai [Tue, 2 Feb 2010 19:42:29 +0000 (19:42 +0000)]
2010-02-02 Ivan Maidanski <ivmai@mail.ru>
* src/atomic_ops/sysdeps/sunc/x86.h (AO_test_and_set_full): Fix
"xchg" data size (remove "l" suffix).
* src/atomic_ops/sysdeps/sunc/x86_64.h (AO_test_and_set_full):
Ditto.
* src/atomic_ops/sysdeps/sunc/x86_64.h (AO_test_and_set_full): Use
AO_TS_t for oldval.
* src/atomic_ops/sysdeps/sunc/x86.h
(AO_compare_double_and_swap_double_full,
AO_HAVE_compare_double_and_swap_double_full): Comment out (since
not tested, might be wrong, and tickles a bug in some Sun CC
versions; besides, __PIC__ macro is never predefined by Sun CC).
ivmai [Mon, 5 Oct 2009 16:43:01 +0000 (16:43 +0000)]
2009-10-05 Ivan Maidanski <ivmai@mail.ru> (really Takashi YOSHII)
* src/atomic_ops/sysdeps/gcc/sh.h: New file.
* src/atomic_ops.h: Include gcc/sh.h if __arm__.
* src/atomic_ops/sysdeps/Makefile.am: Add gcc/sh.h entry.
2009-09-10 Ivan Maidanski <ivmai@mail.ru>
(ivmai123.diff)
* src/atomic_ops/sysdeps/msftc/arm.h: Add FIXME for InterlockedOps
(regarding memory barrier).
* src/atomic_ops/sysdeps/msftc/arm.h: Don't recognize
AO_ASSUME_ARM_ARCH6 anymore; check for _M_ARM >= 6 instead.
* src/atomic_ops/sysdeps/msftc/arm.h (AO_nop_full,
AO_test_and_set): Replace FIXME with the comment saying it is
emulated (in generalize.h); include test_and_set_t_is_ao_t.h.
* src/atomic_ops/sysdeps/msftc/arm.h (AO_store_full): Implement
using InterlockedCompareExchange() (assuming the latter has a full
mbar) for ARMv6+.
* src/atomic_ops/sysdeps/msftc/arm.h: Include
all_atomic_load_store.h and test_and_set_t_is_ao_t.h for the case
of pre-ARMv6; add the comment.
2009-09-10 Ivan Maidanski <ivmai@mail.ru>
(ivmai122.diff)
* src/atomic_ops/sysdeps/armcc/arm_v6.h
(AO_compare_double_and_swap_double): Replace false/true with 0/1.
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Ditto.
* src/atomic_ops/sysdeps/gcc/arm.h: Recognize more ARMv6+
predefined macros (6J, 6ZK, 7A, 7M, 7R).
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Add "cc" clobber to asm.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_HAVE_load_acquire):
Correct the name (convert from the lower case).
* src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_HAVE_load_acquire):
Ditto.
* src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_test_and_set,
AO_compare_and_swap): Comment out unimplemented code (and the
corresponding macros); add FIXME.
* src/atomic_ops.c: Recognize AO_USE_WIN32_PTHREADS overriding
_MSC_VER and __MINGW32__ predefined macros (useful for WinCE with
pthreads-w32 library); don't include signal.h, sys/time.h,
sys/select.h in this case; include windows.h instead.
* src/atomic_ops.c (AO_pause): Use Sleep() in case of
AO_USE_WIN32_PTHREADS (instead of select()).
* src/atomic_ops.c (all_sigs, initialized): Don't define in case
of AO_USE_WIN32_PTHREADS.
* src/atomic_ops.c (AO_compare_and_swap_emulation,
AO_compare_double_and_swap_double_emulation): Don't deal with
signals in case of AO_USE_WIN32_PTHREADS.
2009-09-10 Ivan Maidanski <ivmai@mail.ru>
(diff110)
* src/atomic_ops/sysdeps/msftc/arm.h: New file (initial support
for ARM family).
* src/atomic_ops/sysdeps/msftc/common32_defs.h: New file.
* src/atomic_ops/sysdeps/msftc/arm.h (AO_ASSUME_ARM_ARCH6): New
macro.
* src/atomic_ops/sysdeps/msftc/common32_defs.h
(AO_USE_INTERLOCKED_INTRINSICS): Ditto.
* src/atomic_ops/sysdeps/msftc/x86.h: Move "Interlocked"
declarations to common32_defs.h.
* src/atomic_ops/sysdeps/msftc/common32_defs.h
(AO_INTERLOCKED_VOLATILE): New macro defined (used by
Interlocked-based primitives) for compatibility with older VC++.
* src/atomic_ops/sysdeps/msftc/common32_defs.h: Don't include
missing <intrin.h> if WinCE target.
* src/atomic_ops/sysdeps/msftc/x86.h: Include common32_defs.h
(define AO_USE_INTERLOCKED_INTRINSICS unconditionally).
* src/atomic_ops/sysdeps/msftc/x86.h (AO_fetch_and_add_full,
AO_fetch_and_add1_full, AO_fetch_and_sub1_full,
AO_compare_and_swap_full): Move arch-independent primitives to
common32_defs.h.
* src/atomic_ops/sysdeps/msftc/x86.h: Remove comment about i486 or
better CPU (since Interlocked Add and Xchg primitives are available
on any 32-bit CPU).
* src/atomic_ops.h: Include msftc/x86.h even if _M_IX86 is less than
400 (for i80386).
* src/atomic_ops.h: Include msftc/x86.h if "x86" defined (for WinCE
on x86).
* src/atomic_ops.h: Include msftc/arm.h if ARM target (for WinCE).
2009-09-10 Ivan Maidanski <ivmai@mail.ru>
(diff110)
* src/atomic_ops/sysdeps/msftc/arm.h: New file (initial support
for ARM family).
* src/atomic_ops/sysdeps/msftc/common32_defs.h: New file.
* src/atomic_ops/sysdeps/msftc/arm.h (AO_ASSUME_ARM_ARCH6): New
macro.
* src/atomic_ops/sysdeps/msftc/common32_defs.h
(AO_USE_INTERLOCKED_INTRINSICS): Ditto.
* src/atomic_ops/sysdeps/msftc/x86.h: Move "Interlocked"
declarations to common32_defs.h.
* src/atomic_ops/sysdeps/msftc/common32_defs.h
(AO_INTERLOCKED_VOLATILE): New macro defined (used by
Interlocked-based primitives) for compatibility with older VC++.
* src/atomic_ops/sysdeps/msftc/common32_defs.h: Don't include
missing <intrin.h> if WinCE target.
* src/atomic_ops/sysdeps/msftc/x86.h: Include common32_defs.h
(define AO_USE_INTERLOCKED_INTRINSICS unconditionally).
* src/atomic_ops/sysdeps/msftc/x86.h (AO_fetch_and_add_full,
AO_fetch_and_add1_full, AO_fetch_and_sub1_full,
AO_compare_and_swap_full): Move arch-independent primitives to
common32_defs.h.
* src/atomic_ops/sysdeps/msftc/x86.h: Remove comment about i486 or
better CPU (since Interlocked Add and Xchg primitives are available
on any 32-bit CPU).
* src/atomic_ops.h: Include msftc/x86.h even if _M_IX86 is less than
400 (for i80386).
* src/atomic_ops.h: Include msftc/x86.h if "x86" defined (for WinCE
on x86).
* src/atomic_ops.h: Include msftc/arm.h if ARM target (for WinCE).
2009-09-10 Ivan Maidanski <ivmai@mail.ru>
(diff109_cvs)
* src/atomic_ops/sysdeps/msftc/x86.h: Fix comments (prefix
ASSUME_WINDOWS98 with "AO_").
* src/atomic_ops/sysdeps/msftc/x86.h: Prefix ASSUME_VISTA macro with
"AO_".
* src/atomic_ops/sysdeps/msftc/x86.h (AO_nop_full): Replace
K&R-style function definition with ANSI C one.
* src/atomic_ops/sysdeps/msftc/x86.h (AO_test_and_set_full):
Replace AO_TS_SET with its value 0xff (some compilers does not like
C enum consts inside inline assembler).
* src/atomic_ops/sysdeps/msftc/x86.h (AO_test_and_set_full): Add
comment about "missing return value" warning.
* src/atomic_ops/sysdeps/msftc/x86.h
(AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE): New macro.
* src/atomic_ops/sysdeps/msftc/x86.h (AO_compare_and_swap_full): Use
_InterlockedCompareExchange() with args and result of PVOID type
if AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE is defined (mostly for
DigitalMars compiler support).
* src/atomic_ops/sysdeps/msftc/x86.h
(AO_compare_double_and_swap_double_full): Swap all "val1" and "val2"
variables ("val1" is the lowest part of AO_double_t).
* src/atomic_ops/sysdeps/msftc/x86.h
(AO_compare_double_and_swap_double_full): Rename to
AO_double_compare_and_swap_full (as it has 3 args).
* src/atomic_ops/sysdeps/msftc/x86.h: Replace C++ style comment
with ANSI C one.
2009-09-09 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Patrick Marlier)
* src/atomic_ops/sysdeps/gcc/sparc.h (NO_SPARC_V9):
Renamed to AO_NO_SPARC_V9.
2009-09-01 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Patrick Marlier)
* src/atomic_ops/sysdeps/gcc/sparc.h (AO_test_and_set_full): Use
AO_TS_VAL_t for "oldval" (for 64-bit support).
* src/atomic_ops/sysdeps/gcc/sparc.h (AO_compare_and_swap_full):
New function implemented.
hboehm [Wed, 12 Aug 2009 22:33:52 +0000 (22:33 +0000)]
2009-08-12 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
(diff107_cvs)
* src/atomic_ops/sysdeps/sunc/x86.h: New file.
* src/atomic_ops/sysdeps/sunc/x86_64.h: Ditto.
* src/atomic_ops.h (AO_INLINE): Support inlining for DigitalMars,
Watcom, Sun C.
* src/atomic_ops.h (AO_compiler_barrier): Use intrinsic-based
implementation for VC++ v8+ (include <intrin.h> before it unless
WinCE target); use asm-based barrier implementation for Borland,
DigitalMars and Watcom.
* src/atomic_ops.h: Fix comment (for x86_64).
* src/atomic_ops.h: Include specialized x86.h and x86_64.h arch
headers for Sun C (if not AO_USE_PTHREAD_DEFS).
* src/atomic_ops.h: Include VC-specific arch headers for Borland,
DigitalMars and Watcom (Win32 target only).