|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-04-11 12:23:48
Bobby Thomale wrote:
> Hey guys,
>
> I just tried to get the new Boost 1.30.0 release to work on MacOS,
> using TARGET_CARBON (with threads turned on).
>
> I have a problem to report: there's a new "lightweight mutex" being
> used by the smart pointer library.
>
> There does not seem to be a lightweight mutex implementation for the
> "Carbon MP tasks" thread implementation.
>
> So - when I compile my code under Boost 1.30 I end up at:
>
> # error Unrecognized threading platform
>
> in lightweight_mutex.hpp when it tries to compile any of the smart
> pointer stuff.
You are right, there is no lightweight mutex for Carbon since nobody
submitted one. :-)
In Boost 1.29 and earlier, the #error was commented out, and shared_ptr
silently fell back to the non-thread safe implementation.
If you don't need a thread safe shared_ptr, you can replace the #error with
# include <boost/detail/lwm_nop.hpp>
If you need the thread safety, and you are familiar with Carbon MP tasks,
you can write a lightweight mutex implementation for this platform and
submit it for inclusion. Or you can simply typedef boost::mutex as
boost::detail::lightweight_mutex, if you don't mind linking with
Boost.Threads.
HTH
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