This minor release contains the following changes since v2.4-ga.2:
- 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).
- 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.
- 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.
-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.
- (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().
- 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.
- 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.
- 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
This minor release contains the following changes since v2.4-ga.2:
_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)._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._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.-fstack-protectoror stronger options are now honored and inherited from build environments. Some distributions have-fstack-protector-strongin their default configurations, so this may result in a bit larger binaries.__MCF_cxa_atexit(),__MCF_cxa_at_quick_exit(), and__MCF_cxa_thread_atexit()now accept callbacks of__stdcallor__fastcallcalling convention and taking no argument, which may be useful for registration ofRoUninitialize()andCoUninitialize().DllMain()uponDLL_PROCESS_DETACH, the current process will be terminated, like what nativeSRWLOCKandCRITICAL_SECTIONhave been doing since Windows Vista.__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.Full Changelog: https://github.com/lhmouse/mcfgthread/compare/v2.4-ga.2..master