Releases: doodspav/patomic
Releases · doodspav/patomic
v1.1.0
v1.0.0
Release v0.4.0
[0.4.0] [Minor] - 2021-12-29
Added
- following config macros for internal use:
PATOMIC_HAVE_GNU_SYNC
PATOMIC_HAVE_GNU_ATOMIC
PATOMIC_HAVE_GNU_SYNC_LOCK_FREE_{N}
forN
in[1, 2, 4, 8, 16]
PATOMIC_HAVE_LONG_LONG_EXTN
PATOMIC_HAVE_MS_INT128
PATOMIC_HAVE_MS_INT128_EXTN
PATOMIC_HAVE_IR_SIGN_MAGNITUDE
PATOMIC_HAVE_IR_ONES_COMPL
PATOMIC_HAVE_INTRIN_EFLAGS_CPUID
PATOMIC_HAVE_CPUID_CPUID
- following macros and corresponding config macros for internal use:
PATOMIC_LIKELY
PATOMIC_UNLIKELY
PATOMIC_SIZEOF_{T}
forT
in[char, short, int, long, long long, __int128]
- alignment helpers in
stdalign.h
- typedefs for
char
,short
,int
, andlong
instdint.h
of the form
patomic_TYPE_(un)signed
- conditionally existing typedefs for
long long
and__int128
with the same
naming scheme - macros
PATOMIC_STDINT_HAVE_LLONG/I128
to check if the conditional typedefs
are available gnu
implementation can now fall back to__sync
if it's available and
__atomic
isn't- cpuid helpers in
cpuid.h
Changed
- removed
do_assert
,do_assert_aligned
, anddo_memcpy
parameters from
wrapped macros; now use overrideable default macros fromwrapped/do.h
patomic_(u)intptr_t
now checks for 128bit type before checking for
(unsigned) long long
std
implementation can now use__extension__ (unsigned) long long
if it's
available (by virtue of the fact that it now usespatomic_llong_(un)signed
fromstdint.h
rather than(unsigned) long long
directly)std
implementation now properly does 2s complement checks forneg
opstd
implementation now does runtimeatomic_is_lock_free
checks in
addition to the compile-time macro checks- renamed
PATOMIC_HAVE_TWOS_COMPL
toPATOMIC_HAVE_IR_TWOS_COMPL
Release v0.3.1
[0.3.1] [Patch] - 2021-12-16
Added
wrapped
macro implementations of all ops:fetch.h
wrapsfetch_op
to defineop
direct.h
wraps an atomic operation to define that same operationcmpxchg.h
wrapscmpxchg_weak_explicit
to define any other operation
Changed
- renamed
types/intptr.h
tostdlib/stdint.h
std
implementation now useswrapped
macros instead of defining whole
functions directly
Fixed
std
implementation now also usesATOMIC_LLONG_IS_LOCK_FREE
in the create
functions to make sure the corresponding functions are definedstd
implementation no longer assumessizeof(T)
will return a power of 2
Release v0.3.0
[0.3.0] [Minor] - 2021-12-11
Added
patomic_assert
andpatomic_assert_{always|unreachable}
for internal usepatomic_
versions ofstring.h
functions for internal usepatomic_assert(_unreachable)
supportsNDEBUG
- macro
NNDEBUG
can be defined to overrideNDEBUG
(for patomic variants) - following macros and corresponding config macros for internal use:
PATOMIC_NOINLINE
(MS/GNU)PATOMIC_NORETURN
(MS/GNU/STD)PATOMIC_RESTRICT
(MS/GNU/STD)PATOMIC_FUNC_NAME
(MS/GNU/STD)PATOMIC_UNREACHABLE()
(MS/GNU)
patomic_(u)intptr_t
type inintptr.h
and corresponding config macros- alignment check functions (
patomic_align_meets_{recommended|minimum}
) - disabled warning
C4710
on msvc in presets (could not inline function) - std impl ops assert that inputs are not
NULL
and are suitable aligned
Changed
- replace all uses of
assert
withpatomic_assert*
variants - std impl no longer unconditionally includes any non-freestanding headers
Fixed
- mark all non-static functions and globals which aren't part of the public api
withPATOMIC_NO_EXPORT
- std impl no longer requires the alignment of
_Atomic(T)
andT
to match - std impl assertions in non-fetch binary or arithmetic functions now display
non-fetch function name in assertion errors (instead of fetch name)
Removed
- fake stdatomic (
/src/include/patomic/fake/stdatomic.h
)
Release v0.2.2
[0.2.2] [Minor] - 2021-12-07
Added
- transaction API (with
transaction.h
) including:- transaction helper types in new transaction.h including
flag_t
,config_t
,
status_t
, andresult_t
(with appropriate name prefixes), as well aswfb
(with fallback) variants where necessary patomic_transaction_abort_reason
helper function- transaction ops types in ops.h with additional ops
flag_ops
,special_ops
,
andraw_ops
transaction_t
extras:recommended
(recommended limits for transactions)
andsstring
(safe string operations that won't abort the transaction)- multiple checks for transaction implementations
- transaction helper types in new transaction.h including
- feature check API in
feature_check.h
PATOMIC_MAX_CACHE_LINE_SIZE
macro inalign.h
- corresponding
patomic_cache_line_size
function inalign.h
/align.c
- config macros to check for MS/GNU alignment extensions
Changed
std
implementation now checks for MS/GNU alignment extensions before
defaulting to usingsizeof
in place of_Alignof
Release v0.2.1
[0.2.1] [Patch] - 2021-11-27
Added
HelperFunctionsTest
test suite (for version and memory order functions)PATOMIC_GNU_INLINE_ALWAYS_INLINE_ATTR
config macro
Changed
patomic_version_*
functions no longer markedPATOMIC_FORCE_INLINE
(if inlining is needed, use thePATOMIC_VERSION_*
macros provided)PATOMIC_FORCE_INLINE
can now use__inline__
instead ofinline
if
available
Fixed
patomic_version.h
declarations now wrapped inextern "C" {}
in C++
(caused linker errors when compiling with C++)
Release v0.2.0
[0.2.0] [Minor] - 2021-11-23
Added
- exported version functions corresponding to macros
- function definitions are marked
PATOMIC_FORCE_INLINE
Changed
- split
memory_order
into.h
and.c
, so helper functions are no
longerstatic
- function definitions are marked
PATOMIC_FORCE_INLINE
Release v0.1.2
Changed
- moved all feature macros from
have_*_.h
into newpatomic_config.h
- listed new macros in
README.md
- updated include paths
Added
patomic_config.h
(with default macro definitions)- created
CompilerFeatureChecks.cmake
to check feature macros - created
cmake/in
directory for.in
files - added
patomic_config.h.in
to generate_patomic_config.h
_patomic_config.h
is then included inpatomic_config.h
Removed
- all
have_*_.h
files fromsrc/include/patomic/macros
Release v0.1.1
Added
- Enable IPO (if supported) when config is not Debug
- Link
libatomic.so
if it exists
Fixed
- gcc build example now works correctly
Changed
- Changed
.cmake
file case fromkebab-case
toPascalCase