Boost logo

Boost :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2008-04-09 18:27:11


Peter Dimov wrote:
> Rene Rivera:
>
>> Peter Dimov wrote:
>>> Can someone with access to ARM please run
>>> libs/smart_ptr/test/spinlock_test.cpp and/or take a look at
>>> boost/detail/spinlock_gcc_arm.hpp? I've verified that it compiles, but
>>> can't
>>> run it.
>> What is the expected behavior? I get no output, no CPU usage, and an
>> indefinite running time.
>
> This means a deadlock. The test just locks and unlocks two spinlocks, the
> expected behavior is to return immediately. You can try
> spinlock_try_test.cpp which might produce some output.

OK, I made it output which code it's going to execute. And it only gets
as far as the first call:

====
coda$ ./spinlock_test
// sp.lock();
// boost::detail::yield( 0 );
// boost::detail::yield( 1 );
// boost::detail::yield( 2 );
// boost::detail::yield( 3 );
// boost::detail::yield( 4 );
[and so on...]
====

> Here's the relevant portion of spinlock_gcc_arm.hpp:
>
> bool try_lock()
[...]

That would help if I knew ARM assembly ;-)

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org (msn) - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail

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