A new function _MCF_thread_new_aligned() has been introduced for allocating aligned user-defined data.
A new function _MCF_tls_key_get_destructor() has been added, which gets the destructor of a TLS key.
It is now possible to manage the reference count of a TLS key with _MCF_tls_key_get_ref() and _MCF_tls_key_drop_ref().
A new function _MCF_tls_xset() has been added, which sets a new value and optionally gets its old value.
Some new functions have been added to retrieve system information: _MCF_get_page_size(), _MCF_get_processor_count(), _MCF_get_active_processor_mask().
A new header <mcfgthread/cxx11.hpp> has been added, which contains reference implementations of C++11 std::once_flag, std::mutex, std::timed_mutex, std::recursive_mutex, std::recursive_timed_mutex, std::conditon_variable and std::thread. This header is a drop-in replacement for toolchains that lack standard threading support, such as GCC with the win32 thread model.
Improvements
(v1.3-ga.3) Attempting to join with the calling thread itself, which will always fail, no longer makes it non-joinable.
(v1.3-ga.3)_MCF_event_await_change() now returns the current value of an event, which is a byte and is thus always non-negative, instead of zero. This is an ABI break if code checks for success by comparing the result with zero.
C11 functions are now 'true' functions with file scope.
When creating a thread, if no user-defined data should be requested by passing a size of zero to _MCF_thread_new(), _MCF_thread_get_data() now returns a null pointer on the new thread. Specifically, this behavior is now consistent with the main thread.
New features
_MCF_thread_new_aligned()
has been introduced for allocating aligned user-defined data._MCF_tls_key_get_destructor()
has been added, which gets the destructor of a TLS key._MCF_tls_key_get_ref()
and_MCF_tls_key_drop_ref()
._MCF_tls_xset()
has been added, which sets a new value and optionally gets its old value._MCF_get_page_size()
,_MCF_get_processor_count()
,_MCF_get_active_processor_mask()
.<mcfgthread/cxx11.hpp>
has been added, which contains reference implementations of C++11std::once_flag
,std::mutex
,std::timed_mutex
,std::recursive_mutex
,std::recursive_timed_mutex
,std::conditon_variable
andstd::thread
. This header is a drop-in replacement for toolchains that lack standard threading support, such as GCC with thewin32
thread model.Improvements
_MCF_event_await_change()
now returns the current value of an event, which is a byte and is thus always non-negative, instead of zero. This is an ABI break if code checks for success by comparing the result with zero._MCF_thread_new()
,_MCF_thread_get_data()
now returns a null pointer on the new thread. Specifically, this behavior is now consistent with the main thread.