summaryrefslogtreecommitdiff
path: root/tests/equal.c
diff options
context:
space:
mode:
authorbje <bje>1998-10-04 19:38:04 +0000
committerbje <bje>1998-10-04 19:38:04 +0000
commit11b839f08794de0d090811580a09aa6db5b21f2c (patch)
treec41469a1ba35d67bb40fbf32d480a5b2c5533420 /tests/equal.c
parent0477632dbe94f378853364cd868cc0f800cb5755 (diff)
1998-10-05 Ben Elliston <bje@cygnus.com>
* misc.c (pthread_equal): Correct inverted logic bug. * tests/create1.c: New file; test pthread_create(). Passes. * tests/equal.c: Poor test; remove. * tests/equal1.c New file; test pthread_equal(). Passes.
Diffstat (limited to 'tests/equal.c')
-rw-r--r--tests/equal.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/equal.c b/tests/equal.c
deleted file mode 100644
index 12dbfc2..0000000
--- a/tests/equal.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Test for pthread_equal().
- *
- * Depends on API functions: pthread_create().
- */
-
-#include <pthread.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-void *
-func(void * arg)
-{
- for (;;)
- { /* spin */ }
-}
-
-int
-main(int argc, char * argv[])
-{
- pthread_t id[2];
- int rc;
-
- /* Create two threads and compare their thread IDs.
- The threads will chew CPU, but ensure that their
- IDs will be valid for a long time :-). */
-
- pthread_create(&id[0], NULL, entry, NULL);
- pthread_create(&id[1], NULL, entry, NULL);
-
- if (pthread_equal(id[0], id[1]) == 0)
- {
- /* This is impossible. */
- abort();
- }
-
- /* Never reached. */
- return 0;
-}