On Tue Apr 29 09:47:17 2025 +0000, Piotr Caban wrote:
> Prior to these commits the tests were also skipped, test output looked
> like this:
> ```
> msvcr100.c:258: Tests skipped: msvcr100.dll not installed (got 126)
> 1e24:msvcr100: 0 tests executed (0 marked as todo, 0 as flaky, 0
> failures), 1 skipped.
> msvcr100:msvcr100:1e24 done (0) in 0s 157B
> ```
> msvcr100 (and many other versions) are not part of Windows install, it
> needs to be installed later.
I see, is this what needs to be installed: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?vi… ?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7853#note_102135
On Tue Apr 29 09:47:17 2025 +0000, Rémi Bernon wrote:
> Fwiw this and !7875 !7876 !7877 !7878 now cause many tests to be skipped
> on windows: https://test.winehq.org/data/patterns.html#msvcr100:msvcr100
Prior to these commits the tests were also skipped, test output looked like this:
```
msvcr100.c:258: Tests skipped: msvcr100.dll not installed (got 126)
1e24:msvcr100: 0 tests executed (0 marked as todo, 0 as flaky, 0 failures), 1 skipped.
msvcr100:msvcr100:1e24 done (0) in 0s 157B
```
msvcr100 (and many other versions) are not part of Windows install, it needs to be installed later.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7853#note_102134
Over the past several weeks I've been working on and off on this. I didn't track the hours but I'm sure that I've spent 80+ hours on the feature. I've tested and retested all known scenarios and it seems to be working as expected.
--
v25: cmd: Implement tab completion for command line entry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843
Add `IOCTL_WINEBTH_RADIO_START_AUTH`, which gets used to implement `BluetoothAuthenticateDeviceEx`.
--
v6: bluetoothapis/tests: Add tests for BluetoothAuthenticateDeviceEx.
bluetoothapis: Use a wizard GUI to respond to pairing requests if an authentication callback is not registered.
bluetoothapis: Implement BluetoothAuthenticateDeviceEx.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_START_AUTH.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7885
The wave format is passed to DirectSoundDevice_CreateSoundBuffer, which
duplicates it including the 1 byte of extra data after the end of the
struct.
--
v2: dsound/tests: Allocate right amount of memory in test_secondary8 (ASan).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7926
These patches make a test case attached to the bug https://bugs.winehq.org/show_bug.cgi?id=33190 work.
--
v5: win32u: NtGdiExtTextOutW() should translate x,y from logical to device units at the last step.
win32u: Fix device<->world width/height converters.
gdi32/tests: Add some tests for rotated font metrics.
win32u: Use slightly more readable names for DP/LP converters.
win32u: Use correct helper for converting width to device units.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5068
This fixes Trials Fusion often crashing when disconnecting a controller while there are more still connected.
--
v2: hidclass: Set Status for pending IRPs of removed devices to STATUS_DEVICE_NOT_CONNECTED.
ntdll/tests: Add more NtCancelIoFile[Ex]() tests.
ntdll: Wait for all pending operations to be cancelled in NtCancelIoFile[Ex]().
ntdll: Factor out a cancel_io() function.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7797
Needed by Paint.NET installer. Fortunately, it doesn't need a full implementation.
**Tests**
`0x80000005` is defined as `E_POINTER` in the Windows SDK wrapped with `#if defined(_WIN32) && !defined(_MAC)`
In my Windows 10 22H2 VM the tests are always consistent and the refs for `IDispatcherQueue_Release` and `IDispatcherQueueController_Release` are 1 and 0, respectively. But the testbot VMs are flaky, specifically when creating a dispatcher queue on a dedicated thread. However, when checking the box `Report successful tests (WINETEST_REPORT_SUCCESS)` it seems to succeed more reliably:
- https://testbot.winehq.org/JobDetails.pl?Key=158092
- https://testbot.winehq.org/JobDetails.pl?Key=158096
In the last testbot attempt, `IAsyncInfo_get_Status` failed and returned `Started`:
- https://testbot.winehq.org/JobDetails.pl?Key=158098&f307=exe64.report#k307
Adding a `broken` tag to the ref tests or even removing them is an option, but I'm not sure what to do about the failing `IAsyncInfo_get_Status` test.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7928
Follow-up of !2786, which appears to have been abandoned.
--
v23: ws2_32/tests: Add test for AF_UNIX sockets
server: Fix getsockname() and accept() on AF_UNIX sockets.
server: Introduce error when attempting to create a SOCK_DGRAM AF_UNIX socket.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7650
If ClipCursor is called while the seat doesn't have a pointer and the
call qualifies for locking the pointer, it would have tried to lock a
null wl_pointer.
For example, I'm launching a fullscreen application (which causes ClipCursor calls on startup) in a headless compositor before I launch my virtual keyboard/pointer client. While the pointer is deinitialized and there cannot be a focused hwnd, the cursor wl_surface will not be set, making it qualify for pointer locking.
--
v2: winewayland: Require wl_pointer for pointer constraints.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7857
`MulDiv` doesn't match the correct Windows behavior for the function, which actually differs in some edge cases for 32-bit and 64-bit.
Test case:
```c
MulDiv(1, 0x80000000, 0x80000000);
// WINE - both 32-bit and 64-bit: 0
// Windows (32-bit/kernel32.dll): 2
// Windows (64-bit/kernelbase.dll): -1
```
On Windows 32-bit, this would return 2. On 64-bit, it'd return -1.
However, on WINE, this call would return 0 for both 32-bit and 64-bit. This discrepancy was previously abused by threat actors to detect if the application runs under WINE.
---
On Windows, `MulDiv` has a different implementation for 32-bit (from `kernel32.dll`) and 64-bit (leveraged to `kernelbase.dll` from `kernel32.dll`).
After adjusting the 64-bit code to be an exact replica of the original code from `kernelbase.dll`, it'd still return the incorrect value due to Microsoft's code having undefined behavior with negation. It could be avoided with `-O0` but I opted into rewriting it with the undefined behavior to be, well.. defined.
To clarify, the original code from Microsoft has a bug (logically, at least). But WINE is supposed to have matching behavior so we can run Windows programs as intended.
The 32-bit version of `MulDiv` in Windows has a more complicated bug; I've documented it in the code.
---
This is my first contribution to WINE - I cannot find any `CONTRIBUTING.md` or similar file with guidelines so I did my best to follow the convention of other merge requests.
I've added unit testing for `MulDiv` to ensure there won't be a regression in the future.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7916
This MR adds an initial implementation of the winsock `WSALookupsService*` methods for performing Bluetooth device discovery (`LUP_CONTAINERS`).
--
v17: ws2_32: Implement WSALookupServiceNext for Bluetooth device discovery.
ws2_32: Implement WSALookupServiceBegin for Bluetooth device discovery.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7542
This MR adds an initial implementation of the winsock `WSALookupsService*` methods for performing Bluetooth device discovery (`LUP_CONTAINERS`).
--
v16: ws2_32: Implement WSALookupServiceNext for Bluetooth device discovery.
ws2_32: Implement WSALookupServiceBegin for Bluetooth device discovery.
ws2_32/tests: Add tests for the Bluetooth namespace (NS_BTH) in WSALookupServiceBegin/Next.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7542
Add `IOCTL_WINEBTH_RADIO_START_AUTH`, which gets used to implement `BluetoothAuthenticateDeviceEx`.
--
v5: bluetoothapis/tests: Add tests for BluetoothAuthenticateDeviceEx.
bluetoothapis: Use a wizard GUI to respond to pairing requests if an authentication callback is not registered.
bluetoothapis: Implement BluetoothAuthenticateDeviceEx.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_START_AUTH.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7885
Add `IOCTL_WINEBTH_RADIO_START_AUTH`, which gets used to implement `BluetoothAuthenticateDeviceEx`.
--
v4: bluetoothapis/tests: Add tests for BluetoothAuthenticateDeviceEx.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7885
VxDCall service id 0x0010 provides int24 dispatch functionality and
VxDCall service id 0x002a provides int41 dispatch functionality.
All of these services together with existing service id 0x0029 (for
int31/dpmi functionality) have same API, first VxDCall() argument is
value for EAX register and second argument is value for ECX register.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7906
On Sat Apr 26 17:30:57 2025 +0000, Joe Souza wrote:
> I wasn't aware of WCMD_parameter. That is a good suggestion if it works
> for what's needed here.
FindFirstFileEx is an optimization for remote/network file systems, such that a round trip across the network is not performed for unwanted directory entries. Since Wine seems to support only file systems that are mounted by the host operating system and does not appear to have any direct knowledge of remote-mounted file systems, I can skip using the Ex function here.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101956
On Sat Apr 26 17:30:01 2025 +0000, Joe Souza wrote:
> In the latest changes I have already split out much code from
> WCMD_ReadConsole into subfunctions. You're saying it's still too long?
> I suppose that I could split out the code for the individual case
> statements into separate handler functions, but the code to handle Tab
> is the bulk of that function.
I wasn't aware of WCMD_parameter. That is a good suggestion if it works for what's needed here.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101955
On Sat Apr 26 15:12:31 2025 +0000, eric pouech wrote:
> thanks
> a couple of high level comments:
> * I don't think having a separate source file just for \~400 LoC is
> worth it
> * WCMD_ReadConsole is way too big as a function and need to be split in
> smaller pieces.
> * you should also be using the command line parsing functions instead of
> rewriting them (eg WCMD_parameter to loop against the various parameters)
> from quick testing:
> * when looping around files sometimes filename is inserted in quotes,
> while it shouldn't. Native seems to insert quotes only when filename
> contains specific characters (spaces...), but to also remove them if
> next file doesn't contain any...
> * using "cd c:\\Program Files"\<tab\>\<backspace\>\\\<tab\> doesn't
> behave as native... native circles in the directory content, current MR
> only adds a double quote
> * got a crash when playing with MR (perhaps one of the buffer overflow
> stated above, perhaps not)
> * when the width of the console is smaller than the full line input (eg
> spread at least on two lines), circling gives some strange result
> (cursor and display when from bottom of screen buffer back to top, will
> previous content not shifted)
> likely the current appoach of just having a handle to findfirst/findnext
> will not fit all the (long term) goals. at some point, we want to
> support shift-tab which circles backwards in the matching files. and I
> fail to see what using FindFirstFileEx brings as value, as you filter
> against directory when needed (I'm not asking for supporting shift-tab
> right now, but rather to put in place a structure were it wil fit simply
> when we implement it)
> support for cd/rmdir/ and friends should be added in a second patch
> I didn't go further in the review given the amount a remarks and
> problems stated above. I'll restart when they are solved
> (will look in // to the ESC issue raised)
In the latest changes I have already split out much code from WCMD_ReadConsole into subfunctions. You're saying it's still too long? I suppose that I could split out the code for the individual case statements into separate handler functions, but the code to handle Tab is the bulk of that function.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101954
On Sat Apr 26 15:12:31 2025 +0000, eric pouech wrote:
> that's not sufficient, you have also to compare that inputbuffer up to
> current pos hasn't changed since previous call
> (eg directory with za, za2 and zb zb2 files... circle twice from "za",
> replace "za" by "zb" and circle with tab...)
I missed that case. I tested C:\win<tab> and C:\pro<tab> but resulting paths are different lengths.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101953
On Sat Apr 26 15:12:31 2025 +0000, eric pouech wrote:
> looks to be that curPos can be \> \*numRead, hence reading garbage in
> that case
Line 312 terminates the buffer at *numRead, line 314 sets len to *numRead, and loop at 320 stops when !(curPos < len). Worst case is if curPos == len then we are checking the null terminator.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101952
On Sat Apr 26 17:10:07 2025 +0000, Joe Souza wrote:
> Paths need to be quoted if they are long file names or they contain
> spaces, hence the check for findData.cAlternateFileName.
To do what you're asking here we would need to track whether each level in the path requires quotes, not just the current filename.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101950
On Sat Apr 26 15:12:32 2025 +0000, eric pouech wrote:
> I think quote handling is not done as it should
> from what I see on native: quotes are added when generated word does
> contain characters that would need to be escaped (eg ' ', but didn't
> check all the others)
> need quote is an attribute of current filename (ie they are removed when
> the new (partial) matching file no longer needs them) ; so quotes
> shouldn't be part of the SEARCH_CONTEXT, but only used for display
> (basically: go to beg of word; if needs quotes, print quote; print
> (partial) word; print ending quotes (if needed)
Paths need to be quoted if they are long file names or they contain spaces, hence the check for findData.cAlternateFileName.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101949
didn't play a lot with resulting code, mostly reviewed it
note: dir "c:\\Programs Files\\"\<tab\> should circle among the subdirectories... current code doesn't
also dir c\<tab\> (with a first file displayed), then reduce size of console window to be shorter than input line, will display input on line after the prompt
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101938
eric pouech (@epo) commented about programs/cmd/lineedit.c:
> + }
> + lstrcatW(searchstr, L"*");
> + TRACE("New search: [%s]\n", wine_dbgstr_w(searchstr));
> +
> + sc.isDirSearch = IsDirectoryOperation(inputBuffer, inputBufferLength);
> + }
> +
> + FindNextMatchingDirectoryEntry(searchstr, &sc);
> +
> + if (sc.haveSearchResult) {
> + /* If this is our first time through here for this search, we need to find the insert position
> + * for the results. Note that this is very likely not the same location as the search position.
> + */
> + if (!sc.insertPos) {
> + /* If user entered a backslash after quotes, remove the quotes. */
> + if (curPos > 2 && inputBuffer[curPos-2] == L'\"' && inputBuffer[curPos-1] == L'\\') {
I think quote handling is not done as it should
from what I see on native: quotes are added when generated word does contain characters that would need to be escaped (eg ' ', but didn't check all the others)
need quote is an attribute of current filename (ie they are removed when the new (partial) matching file no longer needs them) ; so quotes shouldn't be part of the SEARCH_CONTEXT, but only used for display (basically: go to beg of word; if needs quotes, print quote; print (partial) word; print ending quotes (if needed)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101937
eric pouech (@epo) commented about programs/cmd/lineedit.c:
> + } else {
> + cc = len;
> + while (cc > 0 && inputBuffer[cc] != L' ' && inputBuffer[cc] != L'\t') {
> + cc--;
> + }
> + }
> + }
> +
> + if (cc != sc->searchPos || inputBuffer[sc->searchPos] == L'\\') {
> + cc++;
> + }
> +
> + sc->insertPos = cc;
> +}
> +
> +static void FindNextMatchingDirectoryEntry(const WCHAR *searchstr, PSEARCH_CONTEXT sc)
a couple of comments here:
* actually, this is not exactly how native (Win10) behaves: native captures the list of matching files at first tab usage, and doesn't update that list if eg. a file matching the pattern is added
* the way done here is a bit more dynamic (as it would capture file creation/deletion), and I don't think it matters much from a user perspective
the main thing I'm concerned about is that code to handle backwards shift-tab will be a bit more painful, and also the restart case (when the matched file is deleted)
I think code would be simpler and more readable when storing the list of files, but I won't block on that. I let you pick up your favorite one.
if you keep current logic, it seems to me that:
* \-\>hadOneMatch is only used locally, and should rather be a local variable
* \-\>hasSearchResult would make more sense be return value from this function
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101936
eric pouech (@epo) commented about programs/cmd/lineedit.c:
> + int lastStartQuote;
> + int searchPos;
> + int insertPos;
> +} SEARCH_CONTEXT, *PSEARCH_CONTEXT;
> +
> +
> +static BOOL IsDirectoryOperation(const WCHAR *inputBuffer, const ULONG inputBufferLength)
> +{
> + int cc = 0;
> + BOOL ret = FALSE;
> +
> + while (cc < inputBufferLength && (inputBuffer[cc] == L' ' || inputBuffer[cc] == L'\t')) {
> + cc++;
> + }
> +
> + if ((cc + 2 < inputBufferLength && (inputBuffer[cc + 2] == L' ' || inputBuffer[cc + 2] == L'\t')) &&
questionning about finding the end of first word algorithm
native behavior is very inconsistent
`>cd\windows`
(note that there's no space between "cd" and "\\"). is supported as command, but tab-completion on "windows" doesn't work
**but**
`>cd"\windows"`
(idem no space, but with quotes). isn't supported as a command, but tab-completion does work
since this relates to corner cases of user interaction, I'm not sure we want to mimic all these broken behaviors
for consistency I'd rather suggest that you use `WCMD_parameter` to split the edit line into separate words you can then work upon
this at least will provide consistency across all the code
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101935
eric pouech (@epo) commented about programs/cmd/lineedit.c:
> + }
> + oldCurPos = curPos;
> + curPos = 0;
> + while (curPos < len &&
> + inputBuffer[curPos] != L'\t' &&
> + inputBuffer[curPos] != L'\x1B'
> + ) {
> +
> + curPos++;
> + }
> + /* curPos is often numRead - 1, but not always, as in the case where history is retrieved
> + * and then user backspaces to somewhere mid-string and then hits Tab.
> + */
> + TRACE("numRead: %lu, curPos: %u\n", *numRead, curPos);
> +
> + switch (inputBuffer[curPos]) {
looks to be that curPos can be \> \*numRead, hence reading garbage in that case
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101933
eric pouech (@epo) commented about programs/cmd/lineedit.c:
> + /* curPos is often numRead - 1, but not always, as in the case where history is retrieved
> + * and then user backspaces to somewhere mid-string and then hits Tab.
> + */
> + TRACE("numRead: %lu, curPos: %u\n", *numRead, curPos);
> +
> + switch (inputBuffer[curPos]) {
> + case L'\t':
> + TRACE("TAB: [%s]\n", wine_dbgstr_w(inputBuffer));
> + inputBuffer[curPos] = L'\0';
> + len = curPos;
> + sc.haveSearchResult = FALSE;
> +
> + /* See if we need to reset an existing search. */
> + if (sc.hSearch != INVALID_HANDLE_VALUE) {
> + /* If tab key was hit at a different location than last time */
> + if (curPos != oldCurPos) {
that's not sufficient, you have also to compare that inputbuffer up to current pos hasn't changed since previous call
(eg directory with za, za2 and zb zb2 files... circle twice from "za", replace "za" by "zb" and circle with tab...)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101932
eric pouech (@epo) commented about programs/cmd/lineedit.c:
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
> + */
> +
> +#define WIN32_LEAN_AND_MEAN
> +
> +#include "wcmd.h"
> +#include "wine/debug.h"
> +
> +WINE_DEFAULT_DEBUG_CHANNEL(cmd);
> +
> +typedef struct _SEARCH_CONTEXT
> +{
> + HANDLE hSearch;
in new code, we tend not to use camel case for function names or fields but rather snake case
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101930
eric pouech (@epo) commented about programs/cmd/lineedit.c:
> +typedef struct _SEARCH_CONTEXT
> +{
> + HANDLE hSearch;
> + WIN32_FIND_DATAW findData;
> + BOOL haveQuotes;
> + BOOL ignoreTrailingQuote;
> + BOOL isDirSearch;
> + BOOL haveSearchResult;
> + BOOL hadOneMatch;
> + int lastStartQuote;
> + int searchPos;
> + int insertPos;
> +} SEARCH_CONTEXT, *PSEARCH_CONTEXT;
> +
> +
> +static BOOL IsDirectoryOperation(const WCHAR *inputBuffer, const ULONG inputBufferLength)
I'd like to see the code for specific handling of first word in a separate commit (just for clarity and make review easier)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101927
thanks
a couple of high level comments:
* I don't think having a separate source file just for \~400 LoC is worth it
* WCMD_ReadConsole is way too big as a function and need to be split in smaller pieces.
* you should also be using the command line parsing functions instead of rewriting them (eg WCMD_parameter to loop against the various parameters)
from quick testing:
* when looping around files sometimes filename is inserted in quotes, while it shouldn't. Native seems to insert quotes only when filename contains specific characters (spaces...), but to also remove them if next file doesn't contain any...
* using "cd c:\\Program Files"\<tab\>\<backspace\>\\\<tab\> doesn't behave as native... native circles in the directory content, current MR only adds a double quote
* got a crash when playing with MR (perhaps one of the buffer overflow stated above, perhaps not)
* when the width of the console is smaller than the full line input (eg spread at least on two lines), circling gives some strange result (cursor and display when from bottom of screen buffer back to top, will previous content not shifted)
likely the current appoach of just having a handle to findfirst/findnext will not fit all the (long term) goals. at some point, we want to support shift-tab which circles backwards in the matching files. and I fail to see what using FindFirstFileEx brings as value, as you filter against directory when needed (I'm not asking for supporting shift-tab right now, but rather to put in place a structure were it wil fit simply when we implement it)
support for cd/rmdir/ and friends should be added in a second patch
I didn't go further in the review given the amount a remarks and problems stated above. I'll restart when they are solved
(will look in // to the ESC issue raised)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101926
Work around slow runtime of current FlushProcessWriteBuffers() implementation on macOS.
The total iteration count becomes:
```
- positive half: 32768 * 1 (old) = 8192 * 4 (new)
- negative half: 32768 * 1 (old) > 8192 * 1 (new)
```
--
v3: kernel32/tests: Shorten time for negative half of litmus test for FlushProcessWriteBuffers().
kernel32/tests: Run store_buffer_litmus_test() in a single-iteration loop.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7908
Work around slow runtime of current FlushProcessWriteBuffers() implementation on macOS.
The total iteration count becomes:
```
- positive half: 32768 * 1 (old) = 8192 * 4 (new)
- negative half: 32768 * 1 (old) > 8192 * 1 (new)
```
--
v2: kernel32/tests: Shorten time for negative half of litmus test for FlushProcessWriteBuffers().
https://gitlab.winehq.org/wine/wine/-/merge_requests/7908
This reverts commit 504a305a60849704f2d83b55e9aabb26d89edf11.
The choice of weak barrier was by design. The stronger barrier broke the
positive half of the litmus test for FlushProcessWriteBuffers():
> virtual.c:4568: Test failed: expected write-read reordering with compiler barrier
> only (got 0 reorderings)
FlushProcessWriteBuffers() is used in tandem with a compiler-only
barrier to implement fast synchronization, where only one side is
executed frequently and the other side only occassionally (e.g., garbage
collection). Prominent applications include .NET and HotSpot JVM.
Although _ReadWriteBarrier() is "marked deprecated," it is in fact used
by Microsoft's own STL library (with explicit suppression of warning) to
implement a compiler-only memory barrier[^1]. The deprecation notice
suggests C++11 atomics as the (only?) alternative.
[^1]: https://github.com/microsoft/STL/blob/b5df16a98934319e2e6864d6036cbe9cd9c74…
--
v2: kernel32/tests: Don't use _ReadWriteBarrier() on clang.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7895
This reverts commit 504a305a60849704f2d83b55e9aabb26d89edf11.
The choice of weak barrier was by design. The stronger barrier broke the
positive half of the litmus test for FlushProcessWriteBuffers():
> virtual.c:4568: Test failed: expected write-read reordering with compiler barrier
> only (got 0 reorderings)
FlushProcessWriteBuffers() is used in tandem with a compiler-only
barrier to implement fast synchronization, where only one side is
executed frequently and the other side only occassionally (e.g., garbage
collection). Prominent applications include .NET and HotSpot JVM.
Although _ReadWriteBarrier() is "marked deprecated," it is in fact used
by Microsoft's own STL library (with explicit suppression of warning) to
implement a compiler-only memory barrier[^1]. The deprecation notice
suggests C++11 atomics as the (only?) alternative.
[^1]: https://github.com/microsoft/STL/blob/b5df16a98934319e2e6864d6036cbe9cd9c74…
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7895
* Remove cases for vwin32 IOCTLs 0x10 and 0x29 numbers as they are unsupported by Windows 9x
* Fix functions accepted by IOCTLs VWIN32_DIOC_DOS_IOCTL and VWIN32_DIOC_DOS_DRIVEINFO
* Add missing IOCTL VWIN32_DIOC_DOS_INT13 case for TRACE log
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7907
To prevent performance degradation, we will cache the result of GetConsoleOutputCP() after executing every external command.
--
v4: cmd: Use the console output code page to read batch files.
programs/cmd: Factor out code_page when searching for a label.
cmd/tests: Add updated code page test in batch file.
cmd: Use the OEM code page if GetConsoleOutputCP fails.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6885
According to the DPMI specification, DPMI functions 0900h-0902h related to
Virtual Interrupt State has to always return state in AL register.
As wine does not support disabling virtual interrupt flag, report that
interrupts are always enabled (AL=1).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7904
Windows provides DPMI host according to DPMI version 0.9.
Add cases for all missing DPMI 0.9 function calls into wine code, set
Carry flag which indicates DPMI failure and mark them with appropriate
FIXME comments.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7902