Hope it is appropriate to post this here. I'm sorry if it is not.
Trying to compile the thread library on the mac I have found some errors that keep it from compiling
under the Carbon MultiProcessing api.
There are some wrong function names in the mac implementation and one or two missing includes
in thread_cleanup.hpp and thread_cleanup.cpp (see attached diffs) so that current stable package
won't compile. The boost::thread::sleep(xt) function does not sleep properly (it wakes up right away)
i tracked the error down to the following call (in boost/libs/thread/src/thread.cpp)
AbsoluteTime sWakeTime(DurationToAbsolute(lMicroseconds));
the DurationToAbsolute() function does not return the proper value
replacing it with
AbsoluteTime sWakeTime = AddDurationToAbsolute(microseconds * kDurationMicrosecond, UpTime());
fixes this bug
under mac os 9 there is an assert that fails when running the condition.hpp
a call to MPCreateSemaphore() with ULONG_MAX results in an error.
a change from ULONG_MAX to LONG_MAX solves this problem
tested on mac os x 10.2.2 and OS 9.2.2
regards arnold
condition.cpp.diff
Description: Binary data
thread_cleanup.cpp.diff
Description: Binary data
thread_cleanup.hpp.diff
Description: Binary data
thread.cpp.diff
Description: Binary data
----Arnold Schwaighofer |-b
"Computer games don't affect kids; I mean, if Pac-Man affected us as kids, we'd all be running around in
darkened rooms, munching magic pills and listening to repetitive electronic music."
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost