Boost logo

Boost Users :

Subject: Re: [Boost-users] intrusive_ptr and multi-threading
From: Andrej van der Zee (andrejvanderzee_at_[hidden])
Date: 2011-06-13 08:10:41


Hi,

Thanks for your reply.

> No, you shouldn't use these macros. They are Windows-specific and correspond
> to InterlockedIncrement/InterlockedDecrement but don't require the inclusion
> of windows.h. If you are targeting the new C++0x, use std::atomic;
> otherwise, until Boost.Atomic is available, you may try
> boost::detail::atomic_count. It's, however, undocumented.

I am using boost::detail::atomic_count now. I saw it is implemented
using a scoped_lock for pthreads. Is there any advantage of using
C++0x in terms of performance on Linux?

Cheers,
Andrej


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net