This is part XX of cmd engine rewrite.
It provides:
- a couple of more internal cleanups,
- avoids leaks on some error paths,
- fixes a couple of redirection related issues
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6057
This reverts commit 5c8ea25014f ("ntdll: Use CLOCK_REALTIME_COARSE for
NtQuerySystemTime() if it has sufficient resolution.")
CLOCK_*_COARSE only provides up to 1ms resolution at CONFIG_HZ=1000.
OTOH, there are several ways to get up to 0.5ms resolution on modern
Windows (high resolution waitable timers, NtSetTimerResolution with
0.5ms). This code path therefore has a possibility of behaving worse
than native.
Since COARSE resolution is HZ dependent, this code path only runs if the
kernel is configured with CONFIG_HZ=1000. Most distro ships does not
ship with this. Therefore, this code path is rarely tested, and is more
of a recipe for surprise. If any application rely on fast
NtQuerySystemTime they are likely already broken for majority of Wine
users.
Given the above reason, don't use CLOCK_REALTIME_COARSE. Use
gettimeofday which is internally hooked to CLOCK_REALTIME.
--
v2: ntdll: Don't use CLOCK_REALTIME_COARSE
https://gitlab.winehq.org/wine/wine/-/merge_requests/6007
On Thu Jul 11 10:51:43 2024 +0000, Elizabeth Figura wrote:
> Sorry for the late approval; I missed that I had been assigned.
> As far as I can tell from the documentation this is correct and matches
> the semantics we need.
> There are a couple trailing whitespace errors in the last patch though.
No worries, and thanks the review!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5237#note_75894
On Thu Jul 11 10:08:54 2024 +0000, Dmitry Timoshkov wrote:
> I'd suggest to add a test. That test most likely will show that
> GetUserNameEx(NameDisplay) returns an error ERROR_NONE_MAPPED on every
> VM in the Testbot. That means that your assumptions about
> GetUserNameEx() behaviour are incorrect, and the code in your plugin
> software won't work on at least some (I'd guess on most) of the Windows
> computers. Therefore your implementation is incorrect as well.
I will. Also, take a look at this:

--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75893