Boost logo

Boost :

From: Tony Juricic (tonygeek_at_[hidden])
Date: 2004-08-01 12:55:45

"Bronek Kozicki" wrote

>I think that definition of _tls_used (from Holger) is
> something new and useful :>

That's great!

 _tls_used variable appears to be absolutely required. To explain, I was
testing one ordinary (not using any boost code) static library with VC7.1
and forcing .tss segment creation with __declspec(thread) as in example:

void NTAPI tls_callback (PVOID, DWORD Reason, PVOID)
    if(Reason == DLL_THREAD_DETACH)
    else if(Reason == DLL_PROCESS_DETACH)

#pragma data_seg(push, old_seg)
#pragma data_seg(".CRT$XLB")
DWORD tls_callback_ptr = (DWORD)tls_callback;
#pragma data_seg(pop, old_seg)

__declspec(thread) int ithread;

... some other library code


I was surprised to find that tls_callback code was not invoked at all!


Boost list run by bdawes at, gregod at, cpdaniel at, john at