Later, a similar inproc sync as the queue will be created for user APC alerts and sent on thread init as well, saving us the need to special case those in the get_inproc_sync request and in the cache.
--
v7: ntdll: Notify wineserver when waiting on inproc queue.
ntdll: Add a reference count to inproc_sync objects.
server: Create an inproc sync for message queue signaling.
win32u: Move server queue handle to ntuser_thread_info.
ntdll: Introduce a helper to wait on an server-side sync object.
ntdll: Check inproc sync signal rights in signal and wait.
server: Use a specific type for internal inproc event syncs.
wineserver: Request RLIMIT_NOFILE maximum allowed value.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8875
I split the implementations into 2 parts to make it looks easier to review. So plz first review this MR and make sure it's good so that we don't have to rebase. The follwing patches is in !7571.
--
v3: mfreadwrite: Implement sink_writer_SetInputMediaType.
mfreadwrite: Implement IMFSinkWriterEx.
mfreadwrite: Add converter transform to stream.
mfreadwrite: Add attributes member to writer struct.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7570
Normally Cyberpunk 2077 spawns #cpu_threads of dispatcher threads.
However with Freebsd, since create_logical_proc_info was a stub,
the game would instead spawn a single dispatcher thread, causing
the game to just crawl.
Working around the issue by adding a barebone implementation of
create_logical_proc_info for FreeBSD so that the game would at
least get a thread count through ntdll.
--
v2: Fix Cyberpunk 2077 spawning only one dispatcher thread in FreeBSD
https://gitlab.winehq.org/wine/wine/-/merge_requests/5213
For Assassin's Creed Syndicate. When switching from fullscreen to a smaller windowed resolution, it calls `SetWindowPos()` centering the window, then calls `ResizeTarget()` and finally `SetFullscreenState()`, and expects the window to preserve the position.
Window style handling is a bit iffy because of the manipulation we do when entering fullscreen, but that's not really new.
--
v4: dxgi/tests: Test window states tracking and restoration in fullscreen mode.
dxgi/tests: Use test contexts in test_resize_target().
wined3d: Conditionally update saved window state in fullscreen mode.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9036
1. For %fs/fsbase the patch follows the macOS logic with LDT descriptor registration and Linux with switching. One notable difference is that on 32->64 transition we set %fs to GSEL(GUFS32_SEL, SEL_UPL) before restoring fsbase, otherwise FreeBSD will just revert it by reloading the selector [at the first opportunity](https://github.com/freebsd/freebsd-src/blob/5673462af5330df207…. GSEL(GUFS32_SEL, SEL_UPL) is the default %fs value on FreeBSD and is special-cased to save/restore actual fsbase value to/from PCB.
2. I was told we could get rid of fsbase glitches in signal handlers by blocking signals with [sigfastblock(2)](https://man.freebsd.org/cgi/man.cgi?query=sigfastblock) between %fs reset to the default value and fsbase reset to pthread_teb. This is currently a part of internal API for libthr, which could be exposed as pthread_signal_block_np for Wine. I'm on the fence whether it's worth it.
3. I fully admit I have no idea what registers are worth preserving around fallback sysarch(AMD64_SET_FSBASE) syscalls and whether it's appropriate to push those registers to stack. ("Kernel" stack should be fine, I assume?) Syscalls definitely clobber r8-r11.
4. For %ss see https://lkml.org/lkml/2015/4/24/216. FreeBSD doesn't have a similar workaround in the kernel, so it goes into Wine.
--
v7: ntdll: Work around AMD SYSRET SS descriptor behavior on FreeBSD.
ntdll: Unbreak new wow64 mode on FreeBSD.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8073
This implements setting `ThreadPriorityBoost`, `ProcessPriorityBoost`, `ProcessBasePriority` and getting `ThreadPriorityBoost`, `ProcessPriorityBoost` NT info classes and adds tests where appropriate.
The actual boosting mechanism will be in part 2 to keep the size of this MR manageable.
--
v3: kernel32/tests: Add tests for GetProcessPriorityBoost/SetProcessPriorityBoost.
kernelbase: Implement SetProcessPriorityBoost.
kernelbase: Implement GetProcessPriorityBoost.
ntdll: Implement ProcessPriorityBoost class in NtSetInformationProcess.
ntdll: Implement ProcessPriorityBoost class in NtQueryInformationProcess.
ntdll: Implement ThreadPriorityBoost class in NtSetInformationThread.
ntdll: Properly implement ThreadPriorityBoost class in NtQueryInformationThread.
ntdll/tests: Add tests for setting process base priority.
ntdll: Implement ProcessBasePriority class in NtSetInformationProcess.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7869
This now accounts for system suspend periods on Linux, similar to how native win32 ticks work.
On macOS `mach_continuous_time` already does so.
~~On BSDs (and other POSIX compliant operating systems) `CLOCK_MONOTONIC` likewise includes suspend time. However they also provide a `CLOCK_BOOTTIME`, which does *not* include suspend time, hence the added `__linux__` check there.~~
See https://lkml.org/lkml/2020/5/8/1707
--
v2: ntdll: Switch to CLOCK_BOOTTIME for monotonic counters when available.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8916