diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2021-10-30 00:24:12 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-10-30 00:24:12 +0300 |
commit | c065b38da9ecfd020c4bace70fd7a45a4a17ffff (patch) | |
tree | 44ce5916d9dc413b3035ef35eee659cc5050bccc | |
parent | f2213c36d2d7d26f2f5466f45003d33f6d94ac62 (diff) | |
download | libatomic_ops-c065b38da9ecfd020c4bace70fd7a45a4a17ffff.tar.gz |
Document config macros in README_win32 and remove them from configure
The configuration macros actual only for builds with the Microsoft
tools are removed from configure.ac (AH_TEMPLATE). At the same time,
these and other macros configuring builds with the Microsoft tools are
now documented in README_win32.txt file.
* configure.ac (AO_ASM_X64_AVAILABLE, AO_ASSUME_VISTA,
AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE,
AO_USE_INTERLOCKED_INTRINSICS): Remove AH_TEMPLATE.
* doc/README_win32.txt: Document AO_ASM_X64_AVAILABLE, AO_ASSUME_VISTA,
AO_CMPXCHG16B_AVAILABLE, AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE,
AO_PREFER_GENERALIZED, AO_UNIPROCESSOR, AO_USE_INTERLOCKED_INTRINSICS,
AO_USE_PENTIUM4_INSTRS.
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | doc/README_win32.txt | 18 |
2 files changed, 19 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index d80dea1..d8e77fc 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P. -# Copyright (c) 2009-2019 Ivan Maidanski +# Copyright (c) 2009-2021 Ivan Maidanski # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED # OR IMPLIED. ANY USE IS AT YOUR OWN RISK. @@ -170,23 +170,14 @@ AH_TEMPLATE([AO_PREFER_GENERALIZED], AH_TEMPLATE([AO_USE_PTHREAD_DEFS], [Emulate atomic operations via slow and async-signal-unsafe \ pthread locking]) -AH_TEMPLATE([AO_ASM_X64_AVAILABLE], - [Inline assembly available (only VC/x86_64)]) -AH_TEMPLATE([AO_ASSUME_VISTA], - [Assume Windows Server 2003, Vista or later target (only VC/x86)]) AH_TEMPLATE([AO_CMPXCHG16B_AVAILABLE], [Assume target is not old AMD Opteron chip (only x86_64)]) AH_TEMPLATE([AO_FORCE_USE_SWP], [Force test_and_set to use SWP instruction instead of LDREX/STREX \ (only arm v6+)]) AH_TEMPLATE([AO_NO_SPARC_V9], [Assume target is not sparc v9+ (only sparc)]) -AH_TEMPLATE([AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE], - [Assume ancient MS VS Win32 headers (only VC/arm v6+, VC/x86)]) AH_TEMPLATE([AO_UNIPROCESSOR], [Assume single-core target (only arm v6+ or GCC intrinsics)]) -AH_TEMPLATE([AO_USE_INTERLOCKED_INTRINSICS], - [Assume Win32 _Interlocked primitives available as intrinsics \ - (only VC/arm)]) AH_TEMPLATE([AO_USE_PENTIUM4_INSTRS], [Use Pentium 4 'mfence' instruction (only x86)]) AH_TEMPLATE([AO_USE_SYNC_CAS_BUILTIN], diff --git a/doc/README_win32.txt b/doc/README_win32.txt index 9f33ba8..174de57 100644 --- a/doc/README_win32.txt +++ b/doc/README_win32.txt @@ -21,3 +21,21 @@ pieces from the resulting src directory contents: Note that the library is covered by the GNU General Public License, while the top 2 of these pieces allow use in proprietary code. + +There are several macros a client could use to configure the build with the +Microsoft tools (except for AO_CMPXCHG16B_AVAILABLE one, others should be +rarely needed in practice): +* AO_ASM_X64_AVAILABLE - inline assembly available (only x86_64) +* AO_ASSUME_VISTA - assume Windows Server 2003, Vista or later target (only + x86, implied if Visual Studio 2015 or older) +* AO_CMPXCHG16B_AVAILABLE - assume target is not old AMD Opteron chip (only + x86_64) +* AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE - assume ancient MS VS Win32 + headers (only arm and x86) +* AO_PREFER_GENERALIZED - prefer generalized definitions to direct + assembly-based ones +* AO_UNIPROCESSOR - assume single-core target (only arm) +* AO_USE_INTERLOCKED_INTRINSICS - assume Win32 _Interlocked* primitives + available as intrinsics (only arm) +* AO_USE_PENTIUM4_INSTRS - use mfence instruction instead of xchg (only x86, + implied if SSE2 is available) |