Skip to content

Windows: Introduce a FEX unixlib and use for all linux syscalls#5424

Open
bylaws wants to merge 2 commits into
FEX-Emu:mainfrom
bylaws:unixliiii
Open

Windows: Introduce a FEX unixlib and use for all linux syscalls#5424
bylaws wants to merge 2 commits into
FEX-Emu:mainfrom
bylaws:unixliiii

Conversation

@bylaws
Copy link
Copy Markdown
Collaborator

@bylaws bylaws commented Apr 17, 2026

This avoids the ever increasing need to expose obscure or fex-specific linux features in wine patches and instead allows FEX to run its own linux code nicely - this could pave way for faster sigbus handling or smc (with far too much effort to the degree i think it's still a bad idea over hashing)

This is somewhat of a breaking change in that wine fex users will also need to install the unixlibs for full functionality, but seems far better in long-run.

Needs testing with shm stats and madvise naming to confirm it still works though before merging.

Mostly authored by claude, which is much better now than jan I must say

Comment thread Source/Windows/Unixlib/CMakeLists.txt
Comment thread Source/Windows/Unixlib/CMakeLists.txt
Comment thread Source/Windows/Unixlib/CMakeLists.txt
@bylaws
Copy link
Copy Markdown
Collaborator Author

bylaws commented Apr 29, 2026

updated

Comment thread Source/Windows/Common/Allocator.cpp
@bylaws
Copy link
Copy Markdown
Collaborator Author

bylaws commented May 17, 2026

updated

@Sonicadvance1
Copy link
Copy Markdown
Member

Since this is primarily authored by AI tools, I'm going to need to spend extra effort reviewing this PR, which is why I've been putting it off.

Dispatcher = *DispatcherPtr;
#endif

if (NtQueryVirtualMemory(NtCurrentProcess(), &__ImageBase, MemoryWineUnixFuncs, &UnixlibHandle, sizeof(UnixlibHandle), nullptr)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current Wine has MemoryWineLoadUnixLibByName, which allows passing unixlib name. With that, it should be possible to share unixlib among wow64 and arm64ec builds. We may backport that to Proton if needed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice, that's much cleaner will switch :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants