]> pd.if.org Git - pdclib.old/blob - opt/pthreads/tss_set.c
PDCLIB-1 Import Unciode character data table (see licensing provisio)
[pdclib.old] / opt / pthreads / tss_set.c
1 #ifndef REGTEST
2 #include <threads.h>
3 #include <pthread.h>
4
5 int tss_set(tss_t key, void *val)
6 {
7     switch(pthread_setspecific(key, val)) {
8     case 0:
9         return thrd_success;
10     default:
11         return thrd_error;
12     }
13 }
14 #endif
15
16 #ifdef TEST
17 #include <_PDCLIB_test.h>
18
19 /* Tested in tss_get.c */
20 int main( void )
21 {
22     return TEST_RESULTS;
23 }
24
25 #endif