summaryrefslogtreecommitdiff
path: root/tests/self1.c
diff options
context:
space:
mode:
authorbje <bje>1998-10-04 22:07:33 +0000
committerbje <bje>1998-10-04 22:07:33 +0000
commit547aa11ebad61aefb3ed27028580dd6873bcc1b5 (patch)
treed657647289fe056619ad7d441be4742ea0dca7df /tests/self1.c
parentd0aed2a7bfdad688de32a7c4d894590502e6bac4 (diff)
1998-10-05 Ben Elliston <bje@cygnus.com>
* tests/self.c: Remove; rename to self1.c. * tests/self1.c: This is the old self.c. * tests/self2.c: New file. Test pthread_self() with a single thread. Passes. * tests/self3.c: New file. Test pthread_self() with a couple of threads to ensure their thread IDs differ. Passes.
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;
+}