Boost logo

Boost Users :

From: Andreas Huber (ahd6974-spamgroupstrap_at_[hidden])
Date: 2006-02-22 05:12:10


David Greene <greened <at> obbligato.org> writes:
> Mutexes don't effect cache coherence. Likely there will have to be
> calls to special intrinsics depending on the architecture.

See Gottlob's response..

> Hmm...I was going to use a synchronous machine due to the state
> access problems I outlined in another message, but now I see that
> won't work if terminated_ is in cacheable memory and there is no
> hardware coherence. For my purposes that's probably ok because
> we'll only run on machines with hardware coherence. Therefore
> if I understand you correctly, it's ok if different threads
> calls process_event() as long as the call (and any call to
> statechart routines) are guarded by mutexes to avoid the
> non-reentrancy problems.

That'll probably work, given that you use a single mutex to protect scheduler
& machine. However, this is rather ugly as you end up locking two mutextes
whenever you queue an event.

Regards,

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap
from the address shown in the header.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net