blob: 812006c53f692ea7421503e4dd0b75b8b8c828e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
Most of the atomic_ops functionality is available under Win32 with
the Microsoft tools, but the build process currently is considerably more
primitive than on Linux/Unix platforms.
To build:
1) Go to the src directory in the distribution.
2) Make sure the Microsoft command-line tools (e.g. nmake) are available.
3) Run "nmake -f Makefile.msft". This should run some tests, which
may print warnings about the types of the "Interlocked" functions.
I haven't been able to make all versions of VC++ happy. If you know
how to, please send a patch.
4) To compile applications, you will need to retain or copy the following
pieces from the resulting src directory contents:
"atomic_ops.h" - Header file defining low-level primitives. This
includes files from:
"atomic_ops"- Subdirectory containing implementation header files.
"atomic_ops_stack.h" - Header file describing almost lock-free stack.
"atomic_ops_malloc.h" - Header file describing almost lock-free malloc.
"libatomic_ops_gpl.lib" - Library containing implementation of the
above two (plus AO_pause() defined in atomic_ops.c).
The atomic_ops.h implementation is entirely in the
header files in Win32.
Most clients of atomic_ops.h will need to define AO_ASSUME_WINDOWS98 before
including it. Compare_and_swap is otherwise not available.
Defining AO_ASSUME_VISTA will make compare_double_and_swap_double available
as well.
Please note that MS compiler for x86 does not align AO_double_t on an 8-byte
boundary, thus to avoid an undefined behavior, an AO_double_t (volatile)
variable should be declared with AO_DOUBLE_ALIGN attribute if the variable
reference is passed to an AO primitive (the attribute is not applicable to
arguments and pointers).
Note that the library is covered by the GNU General Public License, while
the top 2 of these pieces allow use in proprietary code.
|