about summary refs log tree commit diff
path: root/linuxthreads/joinrace.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /linuxthreads/joinrace.c
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'linuxthreads/joinrace.c')
-rw-r--r--linuxthreads/joinrace.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/linuxthreads/joinrace.c b/linuxthreads/joinrace.c
deleted file mode 100644
index 8e1064c984..0000000000
--- a/linuxthreads/joinrace.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Test case by Permaine Cheung <pcheung@cygnus.com>.  */
-
-#include <errno.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-static void *
-sub1 (void *arg)
-{
-  /* Nothing.  */
-  return NULL;
-}
-
-int
-main (void)
-{
-  int istatus;
-  int policy;
-  int cnt;
-  pthread_t thread1;
-  struct sched_param spresult1, sp1;
-
-  for (cnt = 0; cnt < 100; ++cnt)
-    {
-      printf ("Round %d\n", cnt);
-
-      pthread_create (&thread1, NULL, &sub1, NULL);
-      pthread_join (thread1, NULL);
-
-      istatus = pthread_getschedparam (thread1, &policy, &spresult1);
-      if (istatus != ESRCH)
-	{
-	  printf ("pthread_getschedparam returns: %d\n", istatus);
-	  return 1;
-	}
-
-      sp1.sched_priority = 0;
-      istatus = pthread_setschedparam (thread1, SCHED_OTHER, &sp1);
-      if (istatus != ESRCH)
-	{
-	  printf ("pthread_setschedparam returns: %d\n", istatus);
-	  return 2;
-	}
-    }
-
-  return 0;
-}