[PATCH 2/3] winecoreaudio: Implement the lock-free callback design.

Peter Rosin peda at lysator.liu.se
Mon Jan 30 14:41:59 CST 2012


Joerg-Cyril.Hoehle at t-systems.com skrev 2012-01-30 18:30:
> Of the same vein, one liners like
> EnterCS
> This-> playing = StateStopped;
> LeaveCS
> are suspicious too.  What does that guarantee?

Perhaps that another thread doing as below isn't fooled into
calling both one() and three()?

EnterCS
if (This-> playing == StateRunning) {
  one();
}
two();
if (This-> playing == StateStopped) {
  three();
}
LeaveCS

I don't know whether, or not, that has any bearing what-so-ever on
the patch under discussion...

Cheers,
Peter



More information about the wine-devel mailing list