I might have missed something, but is there any reason why clients can't do a readonly mapping of a single page from the service? The service will have to update just one page in this case. Also, is it really not possible to all that with wineserver, which will avoid all that issues of startup dependency. I understand why the wineserver operation is wanted to stay single threaded, but does a completely independent thread which just updates a single page in memory and does not interfere with anything else hurt?
On 4/24/20 15:36, RĂ©mi Bernon wrote:
On startup, every process will create a \Device\WineUsd<PID> section and will map it in place of its temporary user shared data. If creating the section or mapping it fails, the process will continue as before without having user shared data timestamp updates.
If it succeeds, it will then open the \Device\WineUsd\Control device to notify the WineUsd service of a new process startup. The service then opens the process section and maps it in its address space.
If the service is not yet started, then opening the device will fail and the process will continue without having the timestamp updates until it does.
On startup, the WineUsd service will go through the process list and try to open the section to catch up.