Hi John,
If this is your own application and depending on which features you need exactly (synchronization in one application or between multiple processes?), the easiest way is just to use a different set of synchronization primitives.
You could either use CriticalSections (which internally use very fast futex commands on Linux) or slim reader/writer locks (see: http://msdn.microsoft.com/en-us/library/windows/desktop/ms681930(v=vs.85).as... ), which only use wineserver calls when they are blocking. Both methods should definitely bring some performance boost.
Regards, Sebastian
Am 29.04.2014 19:40, schrieb Vincent Povirk:
This is because every call involving a kernel object handle is done via RPC to the wineserver process.
The semantics of things like DuplicateHandle, and all of the various types of waitable kernel objects, need to be reproduced exactly. Even in the case of a single object used by a single thread, in order to optimize out the wineserver call you'd have to somehow be sure no one had duplicated that object into another process. Or you'd have to give the wineserver enough information to duplicate it while letting you wait for/manipulate the object without an RPC call.
So, I don't know that it's necessarily a fundamental architecture problem, but there's a lot you have to think about. And I can't recommend taking on a project like this to a new Wine developer.