[ag-automation] application layer use cases for fieldbus stack

Peter Soetens peter.soetens at fmtc.be
Wed Jul 11 13:42:25 CEST 2007


On Tuesday 10 July 2007 22:45:15 Robert Schwebel wrote:
> Hi Peter,
>
> On Tue, Jul 10, 2007 at 05:10:37PM +0200, Peter Soetens wrote:
> > I'd say, whatever you do, don't use locks.
>
> One more quesstion - last one for this awareness period, promised ;)
>
> I've just re-read your excellent lockless presentation, and I'm
> wondering if there are portable CAS implementations in Linux userspace?
> Is there anything which is standard based, or does one have to use
> architecture specific library code?

The boost C++ library (boost::shared_ptr) uses atomic increment logic, and 
offers its own implementation for each architecture (see: 
boost/detail/sp_counted_base_*.hpp). Somehow, some glibc people decided that 
atomics/CAS did not belong in userspace and are removing it from the libc 
headers. I don't understand why, it's just another assembler instruction. 
Orocos has also its own CAS implementations, mapping to x86, x86_64 and 
powerpc.

Peter
-- 
Peter Soetens -- FMTC -- <http://www.fmtc.be>


More information about the ag-automation mailing list