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_SYNCPATOMIC_HAVE_GNU_ATOMICPATOMIC_HAVE_GNU_SYNC_LOCK_FREE_{N}forNin[1, 2, 4, 8, 16]PATOMIC_HAVE_LONG_LONG_EXTNPATOMIC_HAVE_MS_INT128PATOMIC_HAVE_MS_INT128_EXTNPATOMIC_HAVE_IR_SIGN_MAGNITUDEPATOMIC_HAVE_IR_ONES_COMPLPATOMIC_HAVE_INTRIN_EFLAGS_CPUIDPATOMIC_HAVE_CPUID_CPUID
- following macros and corresponding config macros for internal use:
PATOMIC_LIKELYPATOMIC_UNLIKELYPATOMIC_SIZEOF_{T}forTin[char, short, int, long, long long, __int128]
- alignment helpers in
stdalign.h - typedefs for
char,short,int, andlonginstdint.hof the form
patomic_TYPE_(un)signed - conditionally existing typedefs for
long longand__int128with the same
naming scheme - macros
PATOMIC_STDINT_HAVE_LLONG/I128to check if the conditional typedefs
are available gnuimplementation can now fall back to__syncif it's available and
__atomicisn't- cpuid helpers in
cpuid.h
Changed
- removed
do_assert,do_assert_aligned, anddo_memcpyparameters from
wrapped macros; now use overrideable default macros fromwrapped/do.h patomic_(u)intptr_tnow checks for 128bit type before checking for
(unsigned) long longstdimplementation can now use__extension__ (unsigned) long longif it's
available (by virtue of the fact that it now usespatomic_llong_(un)signed
fromstdint.hrather than(unsigned) long longdirectly)stdimplementation now properly does 2s complement checks fornegopstdimplementation now does runtimeatomic_is_lock_freechecks in
addition to the compile-time macro checks- renamed
PATOMIC_HAVE_TWOS_COMPLtoPATOMIC_HAVE_IR_TWOS_COMPL
Release v0.3.1
[0.3.1] [Patch] - 2021-12-16
Added
wrappedmacro implementations of all ops:fetch.hwrapsfetch_opto defineopdirect.hwraps an atomic operation to define that same operationcmpxchg.hwrapscmpxchg_weak_explicitto define any other operation
Changed
- renamed
types/intptr.htostdlib/stdint.h stdimplementation now useswrappedmacros instead of defining whole
functions directly
Fixed
stdimplementation now also usesATOMIC_LLONG_IS_LOCK_FREEin the create
functions to make sure the corresponding functions are definedstdimplementation no longer assumessizeof(T)will return a power of 2
Release v0.3.0
[0.3.0] [Minor] - 2021-12-11
Added
patomic_assertandpatomic_assert_{always|unreachable}for internal usepatomic_versions ofstring.hfunctions for internal usepatomic_assert(_unreachable)supportsNDEBUG- macro
NNDEBUGcan 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_ttype inintptr.hand corresponding config macros- alignment check functions (
patomic_align_meets_{recommended|minimum}) - disabled warning
C4710on msvc in presets (could not inline function) - std impl ops assert that inputs are not
NULLand are suitable aligned
Changed
- replace all uses of
assertwithpatomic_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)andTto 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_reasonhelper function- transaction ops types in ops.h with additional ops
flag_ops,special_ops,
andraw_ops transaction_textras: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_SIZEmacro inalign.h- corresponding
patomic_cache_line_sizefunction inalign.h/align.c - config macros to check for MS/GNU alignment extensions
Changed
stdimplementation now checks for MS/GNU alignment extensions before
defaulting to usingsizeofin place of_Alignof
Release v0.2.1
[0.2.1] [Patch] - 2021-11-27
Added
HelperFunctionsTesttest suite (for version and memory order functions)PATOMIC_GNU_INLINE_ALWAYS_INLINE_ATTRconfig macro
Changed
patomic_version_*functions no longer markedPATOMIC_FORCE_INLINE
(if inlining is needed, use thePATOMIC_VERSION_*macros provided)PATOMIC_FORCE_INLINEcan now use__inline__instead ofinlineif
available
Fixed
patomic_version.hdeclarations 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_orderinto.hand.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_*_.hinto newpatomic_config.h - listed new macros in
README.md - updated include paths
Added
patomic_config.h(with default macro definitions)- created
CompilerFeatureChecks.cmaketo check feature macros - created
cmake/indirectory for.infiles - added
patomic_config.h.into generate_patomic_config.h _patomic_config.his then included inpatomic_config.h
Removed
- all
have_*_.hfiles fromsrc/include/patomic/macros
Release v0.1.1
Added
- Enable IPO (if supported) when config is not Debug
- Link
libatomic.soif it exists
Fixed
- gcc build example now works correctly
Changed
- Changed
.cmakefile case fromkebab-casetoPascalCase