about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-10 14:34:15 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-10 14:34:15 -0400
commit3ce1f2959437e952b9db4eaeed2407424f11a4d1 (patch)
treedb47da854c7d3bfc2c3bce4c6fc8381075ac9ec4 /nptl
parent1248c1c41508387ff282b208636737e8cdc9b5b0 (diff)
downloadglibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.gz
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.xz
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.zip
Cleanup of configuration options
Make several tool features mandatory and simplify the code.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog11
-rw-r--r--nptl/tst-tls1.c12
-rw-r--r--nptl/tst-tls2.c13
-rw-r--r--nptl/tst-tls3.c10
-rw-r--r--nptl/tst-tls3mod.c5
-rw-r--r--nptl/tst-tls4.c10
-rw-r--r--nptl/tst-tls4moda.c9
-rw-r--r--nptl/tst-tls4modb.c9
-rw-r--r--nptl/tst-tls5.h3
9 files changed, 23 insertions, 59 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 04c2baab9b..3b94006eef 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,14 @@
+2011-09-10  Ulrich Drepper  <drepper@gmail.com>
+
+	* tst-tls1.c: Support for __thread is now mandatory.
+	* tst-tls2.c: Likewise.
+	* tst-tls3.c: Likewise.
+	* tst-tls3mod.c: Likewise.
+	* tst-tls4.c: Likewise.
+	* tst-tls4moda.c: Likewise.
+	* tst-tls4modb.c: Likewise.
+	* tst-tls5.h: Likewise.
+
 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #12403]
diff --git a/nptl/tst-tls1.c b/nptl/tst-tls1.c
index 4e191222a7..f79db4a1c1 100644
--- a/nptl/tst-tls1.c
+++ b/nptl/tst-tls1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -22,7 +22,6 @@
 #include <stdlib.h>
 
 
-#if HAVE___THREAD
 struct test_s
 {
   int a;
@@ -52,19 +51,11 @@ tf (void *arg)
 
   return NULL;
 }
-#endif
 
 
 int
 do_test (void)
 {
-#if !HAVE___THREAD
-
-  puts ("No __thread support in compiler, test skipped.");
-
-  return 0;
-#else
-
   if (s.a != INIT_A || s.b != INIT_B)
     {
       puts ("initial value of s in main thread wrong");
@@ -114,7 +105,6 @@ do_test (void)
     }
 
   return 0;
-#endif
 }
 
 
diff --git a/nptl/tst-tls2.c b/nptl/tst-tls2.c
index 73ed33eb6a..ff3ab3a024 100644
--- a/nptl/tst-tls2.c
+++ b/nptl/tst-tls2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -25,7 +25,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-#if HAVE___THREAD
 
 #define N 10
 static pthread_t th[N];
@@ -106,18 +105,11 @@ tf (void *arg)
 
   return NULL;
 }
-#endif
+
 
 int
 do_test (void)
 {
-#if !HAVE___THREAD
-
-  puts ("No __thread support in compiler, test skipped.");
-
-  return 0;
-#else
-
   if (pthread_barrier_init (&b, NULL, N + 1) != 0)
     {
       puts ("barrier_init failed");
@@ -207,7 +199,6 @@ do_test (void)
       }
 
   return 0;
-#endif
 }
 
 
diff --git a/nptl/tst-tls3.c b/nptl/tst-tls3.c
index 8c2663bb04..87883b0bdd 100644
--- a/nptl/tst-tls3.c
+++ b/nptl/tst-tls3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -73,13 +73,6 @@ int nsigs;
 int
 do_test (void)
 {
-#if !HAVE___THREAD
-
-  puts ("No __thread support in compiler, test skipped.");
-
-  return 0;
-#else
-
   if ((uintptr_t) pthread_self () & (TCB_ALIGNMENT - 1))
     {
       puts ("initial thread's struct pthread not aligned enough");
@@ -206,7 +199,6 @@ do_test (void)
     }
 
   return 0;
-#endif
 }
 
 
diff --git a/nptl/tst-tls3mod.c b/nptl/tst-tls3mod.c
index 4cb96452e2..8ca9956d68 100644
--- a/nptl/tst-tls3mod.c
+++ b/nptl/tst-tls3mod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -26,7 +26,6 @@
 #include <unistd.h>
 #include <pthreaddef.h>
 
-#if HAVE___THREAD
 
 extern pthread_barrier_t b;
 
@@ -88,5 +87,3 @@ tf (void *arg)
 
   return NULL;
 }
-
-#endif
diff --git a/nptl/tst-tls4.c b/nptl/tst-tls4.c
index 52775dee8c..d33c97216e 100644
--- a/nptl/tst-tls4.c
+++ b/nptl/tst-tls4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -25,7 +25,6 @@
 #include <unistd.h>
 #include <tls.h>
 
-#if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
 
 #define N 3
 
@@ -181,11 +180,4 @@ do_test (void)
 
 #define TIMEOUT 5
 #define TEST_FUNCTION do_test ()
-
-#else
-
-#define TEST_FUNCTION 0
-
-#endif
-
 #include "../test-skeleton.c"
diff --git a/nptl/tst-tls4moda.c b/nptl/tst-tls4moda.c
index ff7ee56042..4f16a36919 100644
--- a/nptl/tst-tls4moda.c
+++ b/nptl/tst-tls4moda.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -22,7 +22,6 @@
 #include <unistd.h>
 #include <tls.h>
 
-#if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
 
 static __thread unsigned char foo [32]
   __attribute__ ((tls_model ("initial-exec"), aligned (sizeof (void *))));
@@ -35,7 +34,7 @@ test1 (void)
   for (s = 0; s < sizeof (foo); ++s)
     {
       if (foo [s])
-        abort ();
+	abort ();
       foo [s] = s;
     }
 }
@@ -48,9 +47,7 @@ test2 (void)
   for (s = 0; s < sizeof (foo); ++s)
     {
       if (foo [s] != s)
-        abort ();
+	abort ();
       foo [s] = sizeof (foo) - s;
     }
 }
-
-#endif
diff --git a/nptl/tst-tls4modb.c b/nptl/tst-tls4modb.c
index 99f3b5405f..10cca08fb5 100644
--- a/nptl/tst-tls4modb.c
+++ b/nptl/tst-tls4modb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -22,7 +22,6 @@
 #include <unistd.h>
 #include <tls.h>
 
-#if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
 
 static int i;
 int bar;
@@ -44,7 +43,7 @@ test1 (void)
   for (s = 0; s < sizeof (foo) / sizeof (void *); ++s)
     {
       if (foo [s])
-        abort ();
+	abort ();
       foo [s] = &foo[s];
     }
 }
@@ -57,9 +56,7 @@ test2 (void)
   for (s = 0; s < sizeof (foo) / sizeof (void *); ++s)
     {
       if (foo [s] != &foo [s])
-        abort ();
+	abort ();
       foo [s] = &foo [s ^ 1];
     }
 }
-
-#endif
diff --git a/nptl/tst-tls5.h b/nptl/tst-tls5.h
index 9a76ab7827..12f68b8196 100644
--- a/nptl/tst-tls5.h
+++ b/nptl/tst-tls5.h
@@ -2,7 +2,6 @@
 #include <stdlib.h>
 #include <tls.h>
 
-#if HAVE___THREAD
 
 struct tls_obj
 {
@@ -24,5 +23,3 @@ tls_register_##x (void)				\
   tls_registry[i].size = sizeof (x);		\
   tls_registry[i].align = __alignof__ (x);	\
 }
-
-#endif