Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2004-01-28 07:03:03


Lars Gullik Bjønnes wrote:
[...]
> | http://www.boost.org/boost/detail/lwm_gcc.hpp is also broken.
>
> Because of the sched_yield or something else?

Yes (plus the issue of memory barriers).

>
> Perhaps the lwm_gcc should just be removed?
> (and lwm_linux)

Yes, definitely.

>
> In the lwm_linux case futexes could be used if new enough glibc and
> kernel.

No need for new enough glibc; only new enough kernel (one with
sensible and correct futex impl -- probably 3.2.something ;-) ),
I think.

> (OTOH in that case it is likely that pthread's mutex is
> implement with futex)

Current impl aside for a moment, pthread_mutex_t does some
dispatching because it represents multiple mutex types. A
"lightweight mutex" doesn't need really that. Well, I guess that
boost simply needs standard atomic<> template -- for something
along the lines of

www.terekhov.de/pthread_refcount_t/experimental/refcount.cpp

regards,
alexander.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk