summaryrefslogtreecommitdiff
path: root/tests/self1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/self1.c')
-rw-r--r--tests/self1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/self1.c b/tests/self1.c
new file mode 100644
index 0000000..0addfc8
--- /dev/null
+++ b/tests/self1.c
@@ -0,0 +1,21 @@
+/*
+ * Test for pthread_self().
+ *
+ * Depends on API functions: None.
+ */
+
+#include <pthread.h>
+
+int
+main(int argc, char * argv[])
+{
+ pthread_t id;
+
+ /* We can't do anything with this, though, because it is not
+ safe to assume anything about the internal structure of
+ a `pthread_t'. */
+
+ id = pthread_self();
+
+ return 0;
+}