|
Boost : |
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-05-22 06:43:27
Anthony Williams wrote:
> Thomas Witt <witt_at_[hidden]> writes:
>
>> Any input on this one. Seems like too complicated a fix for 1.34.1
>
> I believe the patch below will fix Johan's immediate problems; I
> would be grateful if he could try it.
There was a typo at (patched) line 82: "#if define(BOOST_HAS_WINTHREADS)"
instead of "#if defined(BOOST_HAS_WINTHREADS)".
IIRC we earlier discussed checking for a valid TSS index before calling
TlsSetValue when in the cleanup_slots context. Further, I'd suggest
statically initializing tss_data_native_key to 0xFFFFFFFF instead of having
it zero initialized.
The attached patch file (against RC_1_34_0) has these things fixed/added.
Please review. I've applied the patch and successfully run all tests under
libs/thread/test for current RC_1_34_0 under WinXP SP2 (SMP + HT). My own
tests also keep running successfully with the patch applied.
Even though the patch "couldn't possibly" have any effects under non-windows
platforms I also applied the patch and ran the tests under OpenSUSE 10.2
using gcc 4.1.2.
Adding a named constant instead of hardcoding 0xFFFFFFFF all over the place
would also be great. However, as I believe this is the last Boost release
containing the "original" thread code I guess the point is moot?
[A bit off-topic] Is it intentional to have the 1.34.1 updates go under the
RC_1_34_0 branch?
Thanks / Johan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk