@@ -7,10 +7,10 @@ David Reid - mackron@gmail.com
77/*
88Introduction
99============
10- This library aims to implement an equivalent to the C11 atomics library. It's intended to be used as a way to
11- enable the use of atomics in a mostly consistent manner to modern C, while still enabling compatibility with
12- older compilers. This is *not* a drop-in replacement for C11 atomics, but is very similar. Only limited testing
13- has been done so use at your own risk. I'm happy to accept feedback and pull requests with bug fixes.
10+ This is a mostly C89 compatible atomics library. It's intended to be used as a way to enable the use of atomics
11+ in a mostly consistent manner to modern C, while still enabling compatibility with older compilers. This is
12+ *not* a drop-in replacement for C11 atomics, but is very similar. Only limited testing has been done so use at
13+ your own risk. I'm happy to accept feedback and pull requests with bug fixes.
1414
1515The following compilers are supported:
1616
@@ -22,6 +22,7 @@ The following compilers are supported:
2222 - OpenWatcom (Tested with 2.0)
2323 - Digital Mars
2424 - Borland C++ (Tested with 5.02)
25+ - chibicc
2526
2627New compilers will use intrinsics. GCC-likes, such as GCC and Clang, will use `__atomic_*` intrinsics through a
2728pre-processor define and should have no overhead. This uses `__GNUC__` to detect GCC-likes.
@@ -32,6 +33,10 @@ of these two paths. Note that only 32- and 64-bit x86 is supported for inlined a
3233tested the inlined assembly paths. It passes basics tests, but things like memory ordering may have some issues.
3334Advice welcome on how to improve this.
3435
36+ For practicality this library supports 64-bit atomics and is therefore not strictly C89 compatible since C89
37+ does not technically support 64-bit integers (these are compiler extensions). However, it should still work on
38+ old compilers. In addition, this library currently assumes `int` is 32 bits.
39+
3540
3641Differences With C11
3742--------------------
0 commit comments