[Bug 46099] Star Citizen not loading after implementation of WaitOnAddress () in wine

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Nov 28 16:12:41 CST 2018


https://bugs.winehq.org/show_bug.cgi?id=46099

--- Comment #21 from Zebediah Figura <z.figura12 at gmail.com> ---
(In reply to Fabian Maurer from comment #20)
> > We need to be able to
> > very that, at the exact point that the thread is queued on select(), the
> > value still matches the comparand.
> 
> What do you mean?

If we check that the value matches before queueing, we can get a race of the
form:

thread A: checks value, still equal to comparand
thread B: sets value
thread B: perform wake
thread A: queue self

We need to prevent such a wake from occurring between the time thread A checks
the value for the last time, and the time it queues itself.

The Linux kernel manages this with futexes by locking the queue and then
(effectively) atomically comparing the value and queueing the thread. We can't
really use this approach, since we can't be reading process memory from the
wineserver.

My idea was to split queueing and waiting into two separate operations for
futexes, though now I'm wondering if perhaps a CS might be better here.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list