]> pd.if.org Git - pdclib/blob - opt/nothread/tss_get.c
Moved notime and mincoll from opt/ to functions/.
[pdclib] / opt / nothread / tss_get.c
1 #ifndef REGTEST
2 #include <threads.h>
3
4 void *tss_get(tss_t key)
5 {
6         return key.value;
7 }
8 #endif
9
10 #ifdef TEST
11 #include "_PDCLIB_test.h"
12
13 #ifndef REGTEST
14 static tss_t key;
15 static char v;
16 #endif
17
18 int main( void )
19 {
20 #ifndef REGTEST
21     TESTCASE(tss_create(&key, NULL) == thrd_success);
22     TESTCASE(tss_get(key) == NULL);
23     TESTCASE(tss_set(key, &v) == thrd_success);
24     TESTCASE(tss_get(key) == &v);
25     tss_delete(key);
26 #endif
27     return TEST_RESULTS;
28 }
29
30 #endif