This is part XIX of cmd engine rewrite.
It's the last MR (for now) for setting success/failure
return code on internal commands.
The remaining todo in this area are due to:
- incompletly implemented builtin (eg: TYPE not handling
multiple files, not wildcards; CHOICE missing a bunch
of features; ...),
- some commands (like START) being implemented as external
executables, hence forcing RETURN CODE = ERRORLEVEL
which is not always wanted,
--
v2: cmd: Cleanup transition bits.
cmd: Improve return code/errorlevel support for external commands.
cmd: Move empty batch command handling to WCMD_batch() callers.
cmd: Set success/failure return code for START command.
cmd: Set success/failure return code for MKLINK command.
cmd: Add more tests for return codes in builtin commands.
cmd: Get rid of CTTY command.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6041
I'm not sure about the need for this solution, so it's a **DRAFT**. For me it is an academic interest to check whether atomic locks will give advantages over pthread_mutex in games. First impressions are that games have become smoother, but need to think about tests that can actually be measured.
Before build need define `WINE_USE_ATOMIC_LOCKS`.
```bash
export CFLAGS="${CFLAGS} -DWINE_USE_ATOMIC_LOCKS"
```
--
v4: ws2_32: Add atomic lock support.
wine32u: Add atomic lock support.
winevulkan: Add atomic lock support.
ntdll: Add atomic lock support.
winewayland: Add atomic lock support.
include: Define custom mutex macroses.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6031
I'm not sure about the need for this solution, so it's a **DRAFT**. For me it is an academic interest to check whether atomic locks will give advantages over pthread_mutex in games. First impressions are that games have become smoother, but need to think about tests that can actually be measured.
Before build need define `WINE_USE_ATOMIC_LOCKS`.
```bash
export CFLAGS="${CFLAGS} -DWINE_USE_ATOMIC_LOCKS"
```
--
v3: ws2_32: Add atomic lock support.
wine32u: Add atomic lock support.
winevulkan: Add atomic lock support.
ntdll: Add atomic lock support.
winewayland: Add atomic lock support.
include: Define custom mutex macroses.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6031
This fixes various corner cases.
This is not motivated by any particular application. However, the server-side
code seems at least as simple as the existing client-side code, is more
accurate, and removes a potential source of complication from any future work
involving asyncs.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6045
That seems to fix some (difficult to reproduce) crashes in EA Desktop / CEF, usually on shutdown but sometimes during starting up.
Currently TpSetWait can set (or clear) the event, while waitqueue_thread_proc() gets woken from NtWaitForMultipleObjects by previously set wait object and call the callback as if new set (or cleared) wait object is signaled. The crashes I was reproducing were always happening when RtlDeregisterWaitEx call is racing with waking the wait and calling the callback.
--
v2: ntdll: Make sure wakeups from already unset events are ignored in waitqueue_thread_proc().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5044
This also bumps the minimum supported version of macOS to 10.12 to unconditionally assume the ulock syscalls are present.
As discussed with @Gcenx this shouldn't be an issue, as the current minimum support version of 10.8 does not work anyways at the moment with only 10.10+ being useable and even then virtually no-one using wine on versions < 10.12 (and also being unsupported by the prebuilt binaries).
Bumping to 10.12 would also have the side-benefit of allowing some cleanup of deprecated functions or legacy codepaths (like `mach_continuous_time` vs `mach_absolute_time` and probably much more).
In my testing ulock futexes are about 2x faster for synchronization than kevents. Using the syscall wrappers here should provide protection against changing syscall numbers, and given that ulock is also directly used by libc++, the probability of an incompatible API change here is basically zero imo.
By default ulock is also process-private, similar to the current linux implementation, cross-process synchronization would require darwin 19+ (macOS 10.15+) with `UL_COMPARE_AND_WAIT_SHARED`.
The diff is a bit bigger than it actually is in effect, since https://gitlab.winehq.org/mzent/wine/-/commit/28a8a991c165f0d37dbf78ca3cdee… is only moving some code around and not actually changing anything.
--
v4: ntdll: Implement futex_wait() and futex_wake_one() on macOS.
ntdll: Simplify futex interface from futex_wake() to futex_wake_one().
ntdll: Use USE_FUTEX to indicate futex support.
ntdll: Prefer futex for thread-ID alerts over kqueue.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5237
This is part XIX of cmd engine rewrite.
It's the last MR (for now) for setting success/failure
return code on internal commands.
The remaining todo in this area are due to:
- incompletly implemented builtin (eg: TYPE not handling
multiple files, not wildcards; CHOICE missing a bunch
of features; ...),
- some commands (like START) being implemented as external
executables, hence forcing RETURN CODE = ERRORLEVEL
which is not always wanted,
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6041
And use new bindings for more MSHTML objects.
--
v2: mshtml: Use host object script bindings for Performance class.
mshtml: Use host object script bindings for PerformanceTiming class.
mshtml: Use host object script bindings for PerformanceNavigation class.
mshtml: Use host object script bindings for History class.
mshtml: Use host object script bindings for DOMImplementation class.
mshtml/tests: Make todo_wine explicit in builtin_toString tests.
jscript: Add support for host functions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6039
On Mon Jul 8 21:43:03 2024 +0000, Etaash Mathamsetty wrote:
> cracked the mystery, im pretty sure AUDCLNT_STREAMFLAGS_RATEADJUST is
> needed for GetService to work :)
This explains things, thanks! I'll amend the tests and add support in `GetService()`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5585#note_75784
On Tue Jul 9 19:55:30 2024 +0000, Davide Beatrici wrote:
> Since the operations are more or less the same as in
> `pulse_create_stream()`, could you create a helper function in a
> separate commit (that will be first in the list), please?
I've been looking into this when originally implementing the function. I had another look now.
The only shared parts that I think we could extract are
```c
new_bufsize_frames = ceil((stream->duration / 10000000.) * new_ss.rate);
size = new_bufsize_frames * 2 * pa_frame_size(&stream->ss);
if (NtAllocateVirtualMemory(GetCurrentProcess(), (void **)&new_buffer, zero_bits, &size, MEM_COMMIT, PAGE_READWRITE))
hr = E_OUTOFMEMORY;
```
but I couldn't make it not overly awkward, mostly because of when the variables have to be set and the failure paths / cleanup. I can do two helpers, one for `bufsize_frames` and `size` each unless you have a more detailed suggestion.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5585#note_75783
I'm not sure about the need for this solution, so it's a **DRAFT**. For me it is an academic interest to check whether atomic locks will give advantages over pthread_mutex in games. First impressions are that games have become smoother, but need to think about tests that can actually be measured.
Before build need define `WINE_USE_ATOMIC_LOCKS`.
```bash
export CFLAGS="${CFLAGS} -DWINE_USE_ATOMIC_LOCKS"
```
--
v2: ws2_32: Add atomic lock support.
wine32u: Add atomic lock support.
winevulkan: Add atomic lock support.
ntdll: Add atomic lock support.
winewayland: Add atomic lock support.
include: Define custom mutex macroses.
msxml3: Fix compilation errors with Clang 18.
configure: Change C standard to C17.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6031