boost::shared_ptr and atomic_count_linux.hpp
Hi, I'm using boost version 1.27.0 on an x86 linux platform and have just upgraded my kernel to 2.4.18. After the upgrade, boost::shared_ptr fails to compile because functions such as "atomic_inc_and_test", "atomic_dec_and_test", etc.. which were previously defined in "atomic.h" are no longer defined there. I can get around the problem by using an older "atomic.h" or by using pthreads, but I was wondering why those functions were removed from the header. Any ideas? Thanks, Jerry jnapoli@iteamsolutions.com [Non-text portions of this message have been removed]
"Jerry Napoli"
| I'm using boost version 1.27.0 on an x86 linux platform and have just | upgraded my kernel to 2.4.18. After the upgrade, boost::shared_ptr | fails to compile because functions such as "atomic_inc_and_test", | "atomic_dec_and_test", etc.. which were previously defined in "atomic.h" | are no longer defined there. I can get around the problem by using an | older "atomic.h" or by using pthreads, but I was wondering why those | functions were removed from the header. Kernel headers are not safe to use in user programs. | Any ideas? In boost CVS now there is a atomic_count_gcc.hpp that uses the primitives that stdlibc++ v3 uses in basic_string. -- Lgb
On Friday, May 24, 2002, at 06:37 AM, Jerry Napoli wrote:
I'm using boost version 1.27.0 on an x86 linux platform and have just upgraded my kernel to 2.4.18. After the upgrade, boost::shared_ptr fails to compile because functions such as "atomic_inc_and_test", "atomic_dec_and_test", etc.. which were previously defined in "atomic.h" are no longer defined there. I can get around the problem by using an older "atomic.h" or by using pthreads, but I was wondering why those functions were removed from the header.
It turns out that atomic.h is a header that's not intended for use outside the Linux kernel. After Peter Dimov discovered this, he came up with a new approach for the Linux version of shared_ptr, which is in Boost 1.28.0, so upgrading is another way to fix your problem. If you want to know why the functions were removed from atomic.h, you'll have to ask a Linux kernel expert. -- Darin
participants (3)
-
Darin Adler
-
Jerry Napoli
-
yg-boost-users@m.gmane.org