[Gc] libatomic_ops: patch: adding support arm-wince-gcc (and minor
fixes for arm)
ivmai at mail.ru
Fri Aug 28 13:36:18 PDT 2009
This patch (ivmai122.diff) does (among minor "typos" fixing) the following: it allows pthread-based atomics emulation for GCC-based toolchains for WinCE.
To enable it (if need), use -D AO_USE_WIN32_PTHREADS (this also requires -D WINCE -I pthreads-w32-2-8-0-release).
The patch is against the current CVS.
libatomic_ops ChangeLog entries:
(AO_compare_double_and_swap_double): Replace false/true with 0/1.
* src/atomic_ops/sysdeps/gcc/arm.h: Recognize more ARMv6+
predefined macros (6J, 6ZK, 7A, 7M, 7R).
(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):
* 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
* 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.
Note 1: this primarily needed for PARALLEL_MARK (and only for pre-ARMv6).
Note 2: GC PARALLEL_MARK is supported for both pre-ARMv6 and ARMv6+ (provided you specify -D GC_PTHREADS_PARAMARK).
Note 3: PARALLEL_MARK is untested (for now).
Note 4: building pthreads-w32 for WinCE is possible (but seems to be not easy).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7601 bytes
Desc: not available
Url : https://napali.hpl.hp.com/pipermail/gc/attachments/20090829/e76253f2/ivmai122.obj
More information about the Gc