On Mon, Sep 23, 2013 at 11:34:36AM +0200, Marin Ramesa wrote:
> On 23.09.2013 10:35:34, Richard Braun wrote:
> > Use the algorithms presented in "Futexes are tricky", I personally
> > won't accept anything less after 2010...
> 
> I do, it's actually the version from 2011. I just added the lock to the 
> mutex. 

Then read it again, and carefully please. Your code should look like
"Mutex, Take 3". You seem to use take 1.

For an actual, readable implementation based on that, see [1], which
will show you how not naive the result should be.

-- 
Richard Braun

[1] http://git.sceen.net/rbraun/x15.git/blob/HEAD:/kern/mutex.h

Reply via email to