]> pd.if.org Git - pdclib.old/blob - opt/pthreads/tss_create.c
PDCLIB-1 Import Unciode character data table (see licensing provisio)
[pdclib.old] / opt / pthreads / tss_create.c
1 #ifndef REGTEST
2 #include <threads.h>
3 #include <pthread.h>
4
5 int tss_create(tss_t *key, tss_dtor_t dtor)
6 {
7     switch(pthread_key_create(key, dtor)) {
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