Boost logo

Threads-Devel :

From: Anthony Williams (anthony_at_[hidden])
Date: 2008-05-05 03:47:42


Quoting Dmitriy V'jukov <dvyukov_at_[hidden]>:

>> From: Anthony Williams <anthony <at> justsoftwaresolutions.co.uk>
>>
>>>> Thanks for the suggestion. Actually, I've been
>>>> intending to change the implementation to use a BitTestAndSet
>>>> instruction where it can, so try_lock becomes:
>>>>
>>>> return !bit_test_and_set(&active_count,lock_flag_bit);
>>>>
>>>> But even then, it might be worth adding a simple non-interlocked read
>>>> before-hand to check for the flag, and only do the BTS if it's not set.
>>>>
>>
>> I've checked in the BTS-based code, and would be grateful if you could
>> have a look.
>
> Ummm... I'm not sure from where I have to check-out latest version...
> I've tried this one:
> http://boost.cvs.sourceforge.net/boost/boost/boost/thread/
> but it seems that it's wrong place...

Yes, Boost no longer uses sourceforge (or CVS) for the repository. The
boost Subversion repository trunk is at
http://svn.boost.org/svn/boost/trunk

>> Have you got access to a quad-core or true multiprocessor machine
>> for testing?
>
> Yes, I episodically have access to quad-core Q6600 machine at home :)
> It acts actually more like 2-core 2-processor machine because of
> shared L2$. It makes situation even more interesting!

I would be grateful if you could run some tests on your machine.

Thanks,

Anthony

-- 
Anthony Williams            | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk