On Thu Jun 29 10:11:44 2023 +0000, Jacek Caban wrote:
I personally like that it looks like server requests, it makes
wineserver communication stand out compared to other function calls. I guess it depends on how far are we planning to go with it, but I can see an argument to use it from PE code and abstract wineserver involvement as "kernel" mapping (wineserver being an implementation detail of "kernel"). There is a very similar mechanism on Windows that's used by user32 instead of syscalls. It should be possible to replace some calls for which currently use interface like NtUserCall*Param with PE-side implementation using such mapping (`GetCursorPos` possibly being one of them, but this particular one would be more tricky and unlikely to worth it). Anyway, we may worry about that if we decide to expose the mapping to PE.
I used the proposal with pointers to const everywhere, which makes it even more looking like server requests, and makes it obvious that the shared memory needs to be write-locked first before any attempt to write to it.