This cleans up `LDR_DONT_RESOLVE_REFS` checks in preparation for !7.
--
v3: ntdlll: Remove redundant LDR_DONT_RESOLVE_REFS checks before calling process_attach().
ntdll: Skip DLL initialization and ldr notification entirely if DONT_RESOLVE_DLL_REFERENCES is set.
kernel32/tests: Test for unexpected loader notification for import dependency loaded with DONT_RESOLVE_DLL_REFERENCES.
kernel32/tests: Test for unexpected LDR_PROCESS_ATTACHED flag in import dependency loaded with DONT_RESOLVE_DLL_REFERENCES.
kernel32/tests: Add basic tests for internal flags of modules loaded with DONT_RESOLVE_DLL_REFERENCES.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7347
On Wed Jan 1 16:32:32 2025 +0000, Nikolay Sivov wrote:
> @alexhenrie is it possible to create a drive without a letter? Regarding
> wine supporting only drives with assigned letters, I don't think it
> matters that much if it turns out to be easy to return a correct path.
> IDrive has separate properties for paths and letters, so maybe there is
> a reason for that.
My understanding is that the way to query all available drives is via DriveCollection. Due to this I changed the tests to what Alex Henrie suggested as it will properly verify the functionality of the function.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7060#note_94929
This is a bit convoluted because of the amount of pieces involved. I'll
try to untangle things a bit.
The container id is meant to be globally unique and stable. We therefore
need a suitable amount of stable entropy that we can feed into a hash
function to get a stable and unique output.
This happens in winebus. The corner stone of hash inputs is the linux
device topology (sysfs path) obtained via udev. Along with all other
possible data we feed this into a hash function to obtain our container
id.
A bunch of extra wine-specific keys needed to be added to carry the
necessary metadata from the driver into the ntoskrnl (where it gets
written to the property registry of the relevant device).
Separate from this we also ingest the linux device topology (sysfs path)
in the winepulse driver.
In mmdevapi we then use winepulse's sysfs path to find the matching
device in the setupapi and query its container id. We now have the same
container id in both the device and the MMDevice, allowing applications
(in particular Games) to find the MMDevice for a given device.
For practical reasons we always resolve the sysfs path to the root
device as early as possible. Container ids are meant to be equal for sub
devices inside a "container" anyway.
--
v4: containerid: helper to generate a containerid from a sysfs path
mmdevapi: correctly read and write containerid as clsid blob
https://gitlab.winehq.org/wine/wine/-/merge_requests/7238
This cleans up `LDR_DONT_RESOLVE_REFS` checks in preparation for !7.
--
v2: ntdlll: Remove redundant LDR_DONT_RESOLVE_REFS checks before calling process_attach().
ntdll: Skip DLL initialization and ldr notification entirely if DONT_RESOLVE_DLL_REFERENCES is set.
kernel32/tests: Test for unexpected loader notification for import dependency loaded with DONT_RESOLVE_DLL_REFERENCES.
kernel32/tests: Test for unexpected LDR_PROCESS_ATTACHED flag in import dependency loaded with DONT_RESOLVE_DLL_REFERENCES.
kernel32/tests: Add basic tests for internal flags of modules loaded with DONT_RESOLVE_DLL_REFERENCES.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7347
Allow the user to press Ctrl-C to abort lengthy DIR (or DIR /p, etc.) operations.
--
v13: programs/cmd: Implement ability to abort lengthy directory operations via Ctrl-C.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322
On Mon Feb 17 19:22:08 2025 +0000, eric pouech wrote:
> thanks for taking the time to update your patch
> unfortunately, it fails on wine regression test
> the attached patch should solve this
> [patch.ctrlc](/uploads/84ae84d1c5cf3d3dfc19904c673bc906/patch.ctrlc)
> also, any reason you changed the ctrl event for and automatic reset?
> actually, I was puzzled with the previous versions with a manual reset
> (my first guess would have been to implement it with an automatic reset)
> I tried things like '(dir /s \\\* || echo aaaaa) && dir \*' (and halting
> the first dir command with ctrl-c) on native:
> * does break the first dir command,
> * executes the RHS of || (as the dir command failed because of the
> ctrl-c),
> * prints the 'aaaaa' string
> * executes the RHS of && (as last command of LHS, eg echo, did succeed),
> * outputs just the directory header (but nothing else) for the second dir
> which fits better with a manual reset (it could be implemented in native
> with something else, like a global variable set in the event handler
> -requires atomic ops-)
Thank you for the patch. I will try to get that integrated sometime today. I'll be traveling for the next few days and will have limited ability during that time to address further concerns.
Automatic vs. manual reset were based on my thinking about whether the function WCMD_ctrlc_status would be called more than once per command iteration. If called only once then ownership of the status passes to the caller and thus automatic reset is cleaner. However, thinking further about this, it probably makes sense to switch back to manual reset, in case future callers (i.e. perhaps for different internal commands, etc.) might want to call it more than once per iteration. That, and the fact that there is a manual reset anyway before command launch in the loop toward the end of wmain suggests that a manual reset would be better, so I will switch back when I submit the changes containing your patch.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94891
thanks for taking the time to update your patch
unfortunately, it fails on wine regression test
the attached patch should solve this
[patch.ctrlc](/uploads/84ae84d1c5cf3d3dfc19904c673bc906/patch.ctrlc)
also, any reason you changed the ctrl event for and automatic reset?
actually, I was puzzled with the previous versions with a manual reset (my first guess would have been to implement it with an automatic reset)
I tried things like '(dir /s \\\* || echo aaaaa) && dir \*' (and halting the first dir command with ctrl-c) on native:
* does break the first dir command,
* executes the RHS of || (as the dir command failed because of the ctrl-c),
* prints the 'aaaaa' string
* executes the RHS of && (as last command of LHS, eg echo, did succeed),
* outputs just the directory header (but nothing else) for the second dir
which fits better with a manual reset (it could be implemented in native with something else, like a global variable set in the event handler -requires atomic ops-)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7322#note_94879
This adds Mach thread priority support (both in the application and realtime band) and recalculates thread priorities when the process priority changes.
Part 3, which is still a bit WIP deals with implementing priority boosts (for main threads and threads which are processing window messages), effectively fully replacing https://gitlab.winehq.org/wine/wine/-/merge_requests/1232.
Currently the implementation in this MR already technically overrides what https://gitlab.winehq.org/wine/wine/-/merge_requests/1232 does, if it makes sense I can also revert it here.
I added a few comments regarding the Mach thread priority API usage, as there is limited documentation available, and much was inferred from the source or by testing. If this is too verbose I can also remove that...
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7317
I don't think these are serious problems, but Clang 20's defaults (from llvm-mingw nightly) were resulting in build failures with `--enable-werror` due to `-Wtautological-compare` and `-Wunused-function`. I hope that the buffer wrap checking is somewhat idiomatic/standard.
If necessary, I can split off the winevulkan change, but it seems minor enough to be grouped in this MR.
--
v2: rpcrt4: Pointer arithmetic fixes (-Wtautological-compare).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7231