Based on [a patch](https://www.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.or… by Jinoh Kang (@iamahuman) from February 2022.
I removed the need for the event object and implemented fast paths for Linux.
On macOS 10.14+ `thread_get_register_pointer_values` is used on every thread of the process.
On Linux 4.14+ `membarrier(MEMBARRIER_CMD_GLOBAL_EXPEDITED, ...)` is used.
On x86 Linux <= 4.13 `madvise(..., MADV_DONTNEED)` is used, which sends IPIs to all cores causing them to do a memory barrier.
On non-x86 Linux <= 4.2 and on other platforms the fallback path using APCs is used.
--
v3: ntdll: Add thread_get_register_pointer_values-based fast path for NtFlushProcessWriteBuffers.
ntdll: Add sys_membarrier-based fast path to NtFlushProcessWriteBuffers.
ntdll: Add MADV_DONTNEED-based fast path for NtFlushProcessWriteBuffers.
ntdll: Make server_select a memory barrier.
ntdll: Implement NtFlushProcessWriteBuffers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/741
Some Windows version expect output to be aligned on 4 bytes.
Notes (from i386 and x86_64 tests):
- MSVC and Mingw/gcc don't layout the two variables (sdki, sdki_ex)
the same way.
- MSVC aligns each variable on 4-byte boundary,
- MingW/GCC stores them in a 8-byte chunk, but starting from the
end of the buffer: hence none of them is on a 4-byte boundary.
So, fixing the alignment of variables is not sufficient to
workaround the compilers' discrepancy on all source code.
I didn't find a generic way to align on 4 bytes structures of size
smaller than 4 bytes (apart from adding the DECLSPEC_ALIGN to
each of the offending structures, likely not that many though).
Ideas welcomed.
Wine-Bugs: https://bugs.winehq.org/show_bug.cgi?id=53684
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1114
Fix a test failure when theming is off. A toolbar without TBSTYLE_FLAT will fill its checked button
background rectangle when theming is inactive, overwriting the checked pattern required for the test.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1112