X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2Fthreads%2Ftss_delete.c;h=ce841d588022d59e3e8df99d43ef5d966e3d6325;hp=90be920898f6c7593c0f7b15c54cdf11f13fce31;hb=abc15df6b9fae3374d24c7cf5c3ab94c605b2a6d;hpb=8894c921674bb116d0a7b8f23a55311e7a768019 diff --git a/platform/win32/functions/threads/tss_delete.c b/platform/win32/functions/threads/tss_delete.c index 90be920..ce841d5 100644 --- a/platform/win32/functions/threads/tss_delete.c +++ b/platform/win32/functions/threads/tss_delete.c @@ -1,39 +1,39 @@ -#ifndef REGTEST -#include -#include -#include - -extern struct _PDCLIB_tss * _PDCLIB_tss_first; -void tss_delete( tss_t key ) -{ - struct _PDCLIB_tss * prev = NULL; - struct _PDCLIB_tss * cur = _PDCLIB_tss_first; - while(cur) { - if(cur == key) { - if(prev) { - prev->_Next = key->_Next; - } else { - _PDCLIB_tss_first = key->_Next; - } - - TlsFree(key->_Key); - free(key); - return; - } - } - - // Not actually a TSS key - abort(); -} -#endif - -#ifdef TEST -#include "_PDCLIB_test.h" - -/* Tested in tss_get.c */ -int main( void ) -{ - return TEST_RESULTS; -} - +#ifndef REGTEST +#include +#include +#include + +extern struct _PDCLIB_tss * _PDCLIB_tss_first; +void tss_delete( tss_t key ) +{ + struct _PDCLIB_tss * prev = NULL; + struct _PDCLIB_tss * cur = _PDCLIB_tss_first; + while(cur) { + if(cur == key) { + if(prev) { + prev->_Next = key->_Next; + } else { + _PDCLIB_tss_first = key->_Next; + } + + TlsFree(key->_Key); + free(key); + return; + } + } + + // Not actually a TSS key + abort(); +} +#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