On Wed Jan 31 18:21:16 2024 +0000, Jinoh Kang wrote:
How about using `NtCreateFile` instead? Mailslot responds to create_file by creating a file object backed by anonymous fd, so we can do something like that w/o abstraction layer violation. That would make `get_object_mapping` and its associated hacks unnecessary; we would just have to implement lookup_name` and perhaps `open_file` (shouldn't be needed if we're using regular/Unix file objects).
I don't think it's the right thing to do. This is shared memory and all shared memory in Wine is implemented using Nt sections. Using something else is going to be considered inappropriate.
Then I think the mmap may be fine as an optimization, or pooling the mappings if we really have to at some point, but in any case maybe it would be better to leave that for later. And for now, only have the simple solution merged.