X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2F_PDCLIB%2F_PDCLIB_runTlsCallbacks.c;h=064fd40957dfc76b714e0b70786890d650740a3f;hp=2a656a43db03695ecf9533423de0375074aef208;hb=abc15df6b9fae3374d24c7cf5c3ab94c605b2a6d;hpb=8894c921674bb116d0a7b8f23a55311e7a768019 diff --git a/platform/win32/functions/_PDCLIB/_PDCLIB_runTlsCallbacks.c b/platform/win32/functions/_PDCLIB/_PDCLIB_runTlsCallbacks.c index 2a656a4..064fd40 100644 --- a/platform/win32/functions/_PDCLIB/_PDCLIB_runTlsCallbacks.c +++ b/platform/win32/functions/_PDCLIB/_PDCLIB_runTlsCallbacks.c @@ -1,34 +1,34 @@ -#include -#include - -#ifndef REGTEST -extern PIMAGE_TLS_CALLBACK __crt_xl_start__; -#ifdef __GNUC__ -__attribute__((section(".CRT$XLZZZ"))) -#else -__declspec(allocate(".CRT$XLZZZ")) -#endif -PIMAGE_TLS_CALLBACK __crt_xl_end__ = NULL; - -/* Runs all TLS callbacks registered in the executable - */ - -void NTAPI _PDCLIB_runTlsCallbacks(void * image, DWORD reason, PVOID pv); -void NTAPI _PDCLIB_runTlsCallbacks(void * image, DWORD reason, PVOID pv) -{ - PIMAGE_TLS_CALLBACK * pcb = &__crt_xl_start__; - - while(*pcb) (*(pcb++))(image, reason, pv); -} -#endif - -#ifdef TEST -#include "_PDCLIB_test.h" - -/* Tested in tss_get.c */ -int main( void ) -{ - return TEST_RESULTS; -} - +#include +#include + +#ifndef REGTEST +extern PIMAGE_TLS_CALLBACK __crt_xl_start__; +#ifdef __GNUC__ +__attribute__((section(".CRT$XLZZZ"))) +#else +__declspec(allocate(".CRT$XLZZZ")) +#endif +PIMAGE_TLS_CALLBACK __crt_xl_end__ = NULL; + +/* Runs all TLS callbacks registered in the executable + */ + +void NTAPI _PDCLIB_runTlsCallbacks(void * image, DWORD reason, PVOID pv); +void NTAPI _PDCLIB_runTlsCallbacks(void * image, DWORD reason, PVOID pv) +{ + PIMAGE_TLS_CALLBACK * pcb = &__crt_xl_start__; + + while(*pcb) (*(pcb++))(image, reason, pv); +} +#endif + +#ifdef TEST +#include "_PDCLIB_test.h" + +/* Tested in tss_get.c */ +int main( void ) +{ + return TEST_RESULTS; +} + #endif \ No newline at end of file