Skip to content

v2.5 Release Notes #351

Description

@lhmouse

This minor release contains the following changes since v2.4-ga.2:

  1. New thread affinity APIs, _MCF_thread_get_affinity() and _MCF_thread_set_affinity(), have been added. Before manipulating thread affinities, it is necessary to get configuration of CPUs on the system with _MCF_cpu_collection_new(), which provides information such as physical core identifiers, processor groups, and efficiency classes (P-/E-cores, or big/little cores).
  2. A new function _MCF_thread_p_new() has been added, which allows specifying the stack size for the new thread, and has an output parameter for _MCF_thread* which is written before the new thread starts execution. As a consequence, thrd_create(), __gthread_create(), and __MCF_libcxx_thread_create() guarantee that the thread pointer is available for the new thread, which some code relies on.
  3. A new function _MCF_once_consume_wait() has been added, which, as its name suggests, has consume semantics. When targeting ARM64, the function avoids potential overhead of an acquire barrier that is introduced by _MCF_once_wait(), but it is tricky and has to be used with extreme caution.
  4. -fstack-protector or stronger options are now honored and inherited from build environments. Some distributions have -fstack-protector-strong in their default configurations, so this may result in a bit larger binaries.
  5. (x86-32 only) __MCF_cxa_atexit(), __MCF_cxa_at_quick_exit(), and __MCF_cxa_thread_atexit() now accept callbacks of __stdcall or __fastcall calling convention and taking no argument, which may be useful for registration of RoUninitialize() and CoUninitialize().
  6. If a deadlock is detected in DllMain() upon DLL_PROCESS_DETACH, the current process will be terminated, like what native SRWLOCK and CRITICAL_SECTION have been doing since Windows Vista.
  7. The following functions now return -2 in case of a system error (for example, when out of memory): __MCF_dtor_queue_push(), _MCF_thread_set_priority(), _MCF_tls_set(), _MCF_tls_xset(). The error code -1 is returned only in case of an invalid argument.
  8. Support for C++98 has been dropped; all headers now require C++11 or later.

Full Changelog: https://github.com/lhmouse/mcfgthread/compare/v2.4-ga.2..master

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions