]> pd.if.org Git - pdclib.old/blobdiff - opt/pthreads/tss_delete.c
pthread c11 threading backend: add support for thread specific data
[pdclib.old] / opt / pthreads / tss_delete.c
diff --git a/opt/pthreads/tss_delete.c b/opt/pthreads/tss_delete.c
new file mode 100644 (file)
index 0000000..906c761
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef REGTEST
+#include <threads.h>
+#include <pthread.h>
+#include <assert.h>
+
+void tss_delete(tss_t key)
+{
+    assert(pthread_key_delete(key) == 0);
+}
+#endif
+
+#ifdef TEST
+#include <_PDCLIB_test.h>
+
+/* Tested in tss_get.c */
+int main( void )
+{
+    return TEST_RESULTS;
+}
+
+#endif