summaryrefslogtreecommitdiff
path: root/tests/self3.c
diff options
context:
space:
mode:
authorrpj <rpj>1999-02-22 02:54:12 +0000
committerrpj <rpj>1999-02-22 02:54:12 +0000
commit2ef097640758653a0e9d63e90a4aac329cd86368 (patch)
tree71751f699b0aedba3227446ac228d30f2a127173 /tests/self3.c
parent943bc9bb02212649a83ec32152299d50d34226e6 (diff)
1999-02-23 Ross Johnson <rpj@ise.canberra.edu.au>
* Makefile: Some refinement. * *.c: More exhaustive checking through assertions; clean up; add some more tests.
Diffstat (limited to 'tests/self3.c')
-rw-r--r--tests/self3.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/self3.c b/tests/self3.c
deleted file mode 100644
index dc220b7..0000000
--- a/tests/self3.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <pthread.h>
-#include <assert.h>
-#include <stdio.h>
-
-void *
-entry(void * arg)
-{
- /* Like systems such as HP-UX, we can't print the value of the thread ID
- because it's not an integral type. Instead, we'll poke our noses into
- the pthread_t structure and dump a useful internal value. This is
- ordinarily bad, m'kay? */
-
- pthread_t t = pthread_self();
- printf("thread no. %d has id %lx\n", (int) arg, t->threadH);
- return 0;
-}
-
-int
-main()
-{
- int rc;
- pthread_t t[2];
-
- rc = pthread_create(&t[0], NULL, entry, (void *) 1);
- assert(rc == 0);
-
- rc = pthread_create(&t[1], NULL, entry, (void *) 2);
- assert(rc == 0);
-
- Sleep(2000);
- return 0;
-}