X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=opt%2Fnothread%2Ftss_get.c;h=483088a252afd0c5ce9b4f2bb4292647272f2f24;hb=4321ebdd142b534d8b7b6c31e01790f77ac46319;hp=ee031f1593468e0428f6cbc616a329fd5335e225;hpb=29387e76cd5cd340fe7d811dc9830931d3d0ec9b;p=pdclib diff --git a/opt/nothread/tss_get.c b/opt/nothread/tss_get.c index ee031f1..483088a 100644 --- a/opt/nothread/tss_get.c +++ b/opt/nothread/tss_get.c @@ -1,30 +1,30 @@ -#ifndef REGTEST -#include - -void *tss_get(tss_t key) -{ - return key.value; -} -#endif - -#ifdef TEST -#include <_PDCLIB_test.h> - -#ifndef REGTEST -static tss_t key; -static char v; -#endif - -int main( void ) -{ -#ifndef REGTEST - TESTCASE(tss_create(&key, NULL) == thrd_success); - TESTCASE(tss_get(key) == NULL); - TESTCASE(tss_set(key, &v) == thrd_success); - TESTCASE(tss_get(key) == &v); - tss_delete(key); -#endif - return TEST_RESULTS; -} - -#endif +#ifndef REGTEST +#include + +void *tss_get(tss_t key) +{ + return key.value; +} +#endif + +#ifdef TEST +#include "_PDCLIB_test.h" + +#ifndef REGTEST +static tss_t key; +static char v; +#endif + +int main( void ) +{ +#ifndef REGTEST + TESTCASE(tss_create(&key, NULL) == thrd_success); + TESTCASE(tss_get(key) == NULL); + TESTCASE(tss_set(key, &v) == thrd_success); + TESTCASE(tss_get(key) == &v); + tss_delete(key); +#endif + return TEST_RESULTS; +} + +#endif