From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2002-05-15 08:14:50
"Peter Dimov" <pdimov_at_[hidden]> writes:
| From: "Lars Gullik Bjønnes" <larsbj_at_[hidden]>
>> Something like this might work for gcc.
>> I have not tested it, especially the use of __exchange_and_add must be
>> If something like this is added the lwm_linux.hpp can probably just be
| Does shared_ptr_mt_test.cpp work? It's not a comprehensive test; still, it's
| better than nothing.
[larsbj_at_trylle smart_ptr]$ g++ -O2 -Wall -W -I/home/larsbj/Development/boost -o shared_ptr_mt_test shared_ptr_mt_test.cpp -lpthread
In file included from /home/larsbj/Development/boost/boost/detail/lightweight_mutex.hpp:51,
#warning Using gcc atomicity.h
[I added this to be sure that the atomicity.h files was actually
[larsbj_at_trylle smart_ptr]$ ./shared_ptr_mt_test
Using POSIX threads: spinlock, 16 threads, 1048576 iterations:
no errors detected
So yes, it seems to work.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk