Skip to content

Releases: lhmouse/mcfgthread

v1.0-beta.10

15 May 13:35
Compare
Choose a tag to compare
v1.0-beta.10 Pre-release
Pre-release

This revision contains no feature, but the following improvements:

  1. The __MCF_STATIC_ASSERT() macro is now functional in C++.
  2. Semaphore and event should no longer cause compiler errors if compiled as C++98.
  3. x86 builds without optimization enabled no longer end up with an undefined reference to __udivdi3().
  4. When building the library, pre-compiled headers are now enabled by default, which can be disabled by passing --disable-pch to configure.
  5. 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

13 May 05:04
Compare
Choose a tag to compare
v1.0-beta.9 Pre-release
Pre-release

This revision contains the following changes:

  1. Two new synchronization primitives, _MCF_event and _MCF_sem, have been added:
    • The _MCF_event primitive can be used to implement std::atomic_flag; read event.h for details.
    • The _MCF_sem primitive is an anonymous semaphore.
  2. 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.
  3. 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

07 May 14:49
Compare
Choose a tag to compare
v1.0-beta.8 Pre-release
Pre-release

This revision contains the following changes:

  1. 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.
  2. __MCF_ALWAYS_INLINE functions now have external linkage (the static specifier has been removed) to prevent warnings when they are called from extern inline functions.

Full Changelog: v1.0-beta.7...v1.0-beta.8

v1.0-beta.7

06 May 06:07
Compare
Choose a tag to compare
v1.0-beta.7 Pre-release
Pre-release

This revision contains the following changes:

  1. 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.
  2. __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

02 May 06:06
Compare
Choose a tag to compare
v1.0-beta.6 Pre-release
Pre-release

This revision contains the following changes:

  1. 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 of pthread_key_create() on Linux.
    • This has no effect on callbacks registered with __cxa_thread_atexit() which are called both upon thread and process exit.
  2. Multiple definition errors about memcmp() etc. when linking against the static library no longer happen; reported by lhmouse/nano-win#40.
  3. 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

27 Apr 09:50
Compare
Choose a tag to compare
v1.0-beta.5 Pre-release
Pre-release

This revision contains the following updates:

  1. ABI version macros have been added in <mcfgthread/version.h> which is also included by other headers.
  2. DLL version information can now be viewed in Windows Explorer.
  3. GetModuleHandleExW() is no longer invoked upon each thread's creation and termination.
  4. A new function _MCF_hires_utc_now() has been added, which can be utilized to implement clock_gettime() in the future.
  5. _MCF_mutex_lock() and _MCF_mutex_unlock() can be inlined if there is no contention, for example, in single-threaded programs.
  6. Standard string functions memcpy(), memmove(), memset() and memcmp() 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.
  7. Prebuilt binaries are now optimized for size instead of speed.

Full Changelog: v1.0-beta.4...v1.0-beta.5

v1.0-beta.4

21 Apr 04:09
Compare
Choose a tag to compare
v1.0-beta.4 Pre-release
Pre-release

This revision contains the following updates:

  1. -mnop-fun-dllimport has been added into CFLAGS. This means calls to dllimport'd functions no longer need to go through __imp_ thunks and are now more efficient.
  2. 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

19 Apr 16:34
1486368
Compare
Choose a tag to compare
Optimization of mutex Pre-release
Pre-release

This revision contains the following updates:

  1. All comments have been changed to C89 style, so headers should compile without warnings as C89.
  2. 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

17 Apr 13:09
Compare
Choose a tag to compare
v1.0-beta.2 Pre-release
Pre-release

This revision contains the following update:

  1. __gthread_self() no longer returns a null pointer inside callbacks registered with atexit().

Have a nice day.

Full Changelog: v1.0-beta...v1.0-beta.2

GCC, binutils, mingw-w64 CRT and GDB bootstrap complete

17 Apr 07:36
94bd7c5
Compare
Choose a tag to compare

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.