Releases: lhmouse/mcfgthread
v1.0-beta.10
This revision contains no feature, but the following improvements:
- The
__MCF_STATIC_ASSERT()
macro is now functional in C++. - Semaphore and event should no longer cause compiler errors if compiled as C++98.
- x86 builds without optimization enabled no longer end up with an undefined reference to
__udivdi3()
. - When building the library, pre-compiled headers are now enabled by default, which can be disabled by passing
--disable-pch
toconfigure
. - New bundled import libraries for KERNELBASE.DLL and NTDLL.DLL have been added:
- mcfgthread can now be built without the mingw-w64 CRT.
- The DLL is now linked against KERNELBASE.DLL instead of KERNEL32.DLL, and calls to Windows APIs are a bit more efficient.
If there are no severe bugs or other blockers, this revision will be the first release candidate for v1.0.
Enjoy.
Full Changelog: v1.0-beta.9...v1.0-beta.10
v1.0-beta.9
This revision contains the following changes:
- Two new synchronization primitives,
_MCF_event
and_MCF_sem
, have been added:- The
_MCF_event
primitive can be used to implementstd::atomic_flag
; read event.h for details. - The
_MCF_sem
primitive is an anonymous semaphore.
- The
- Exceptions thrown from condition variable callbacks are now explicitly disallowed. Previously such exceptions used to lead to undefined behavior, but now they result in calls to
std::terminate()
instead. - A tiny wrapper function
_MCF_cond_signal(cond)
has been added, which is equivalent to_MCF_cond_signal_some(cond, 1)
.
Full Changelog: v1.0-beta.8...v1.0-beta.9
v1.0-beta.8
This revision contains the following changes:
- Atomic functions have been refactored to avoid a GCC optimization bug. This has improved performance a little by allowing dead memory stores to be optimized out, while has also reduced binary size by ~2KiB. These new atomic functions are public APIs, denoted by a single leading underscore in their names.
__MCF_ALWAYS_INLINE
functions now have external linkage (thestatic
specifier has been removed) to prevent warnings when they are called fromextern inline
functions.
Full Changelog: v1.0-beta.7...v1.0-beta.8
v1.0-beta.7
This revision contains the following changes:
- Some functions have been optimized to reduce code size, which unfortunately does not always work due to a GCC bug. Clang is not suffering from this issue.
__gthread_join()
and__gthread_detach()
now detect non-joinable threads and fail accordingly, instead of decrementing the reference count blindly and causing undefined behavior. This is an ABI break if your program is linked against mcfgthread without optimization enabled. Upgrading is suggested, as soon as possible.
Full Changelog: v1.0-beta.6...v1.0-beta.7
v1.0-beta.6
This revision contains the following changes:
- Destructors that have been registered with
_MCF_tls_key_new()
are no longer called upon process exit, as specified by the ISO C11 standard, which also matches the behavior ofpthread_key_create()
on Linux.- This has no effect on callbacks registered with
__cxa_thread_atexit()
which are called both upon thread and process exit.
- This has no effect on callbacks registered with
- Multiple definition errors about
memcmp()
etc. when linking against the static library no longer happen; reported by lhmouse/nano-win#40. - The binaries were built with GCC 12, unlike previous ones which were built with GCC 11.
Full Changelog: v1.0-beta.5...v1.0-beta.6
v1.0-beta.5
This revision contains the following updates:
- ABI version macros have been added in
<mcfgthread/version.h>
which is also included by other headers. - DLL version information can now be viewed in Windows Explorer.
GetModuleHandleExW()
is no longer invoked upon each thread's creation and termination.- A new function
_MCF_hires_utc_now()
has been added, which can be utilized to implementclock_gettime()
in the future. _MCF_mutex_lock()
and_MCF_mutex_unlock()
can be inlined if there is no contention, for example, in single-threaded programs.- Standard string functions
memcpy()
,memmove()
,memset()
andmemcmp()
have been implemented in assembly for x86 and x86-64. They are exported from the DLL for external use. On the other platforms, the generic ones from NTDLL are called. This can reduce code size a bit. - Prebuilt binaries are now optimized for size instead of speed.
Full Changelog: v1.0-beta.4...v1.0-beta.5
v1.0-beta.4
This revision contains the following updates:
-mnop-fun-dllimport
has been added intoCFLAGS
. This means calls todllimport
'd functions no longer need to go through__imp_
thunks and are now more efficient.- The hashing policy of mutexes has been improved a little so there should less likely be collisions.
Full Changelog: v1.0-beta.3...v1.0-beta.4
Optimization of mutex
This revision contains the following updates:
- All comments have been changed to C89 style, so headers should compile without warnings as C89.
- The mutex has been optimized heavily. Benchmark results have been added.
Have a nice day.
Full Changelog: v1.0-beta.2...v1.0-beta.3
v1.0-beta.2
This revision contains the following update:
__gthread_self()
no longer returns a null pointer inside callbacks registered withatexit()
.
Have a nice day.
Full Changelog: v1.0-beta...v1.0-beta.2
GCC, binutils, mingw-w64 CRT and GDB bootstrap complete
I have so far bootstrapped GCC 11, binutils 2.38, mingw-w64 10.0 and GDB 11.2, and seen no problems so far.
Please read notes in README.md before using this library. More details can be found here.
- If you are using MSYS2, these packages may be installed with
pacman -U *.pkg.tar.gz
. - It is possible to install these packages by unpacking and copying files by hand.
Have a nice day.