X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=opt%2Fpthreads%2Ftss_set.c;fp=opt%2Fpthreads%2Ftss_set.c;h=99895e07800579b7f6635029429e01543415d270;hp=0000000000000000000000000000000000000000;hb=fd89f130aedf49fbdb3e4f5a24c9cedb56eea22e;hpb=f893788005db800c0bdb8d02ae2a9aa6ce3437a9 diff --git a/opt/pthreads/tss_set.c b/opt/pthreads/tss_set.c new file mode 100644 index 0000000..99895e0 --- /dev/null +++ b/opt/pthreads/tss_set.c @@ -0,0 +1,25 @@ +#ifndef REGTEST +#include +#include + +int tss_set(tss_t key, void *val) +{ + switch(pthread_setspecific(key, val)) { + case 0: + return thrd_success; + default: + return thrd_error; + } +} +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +/* Tested in tss_get.c */ +int main( void ) +{ + return TEST_RESULTS; +} + +#endif