aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
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 04c2baa..3b94006 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 4e19122..f79db4a 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 73ed33e..ff3ab3a 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 8c2663b..87883b0 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 4cb9645..8ca9956 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 52775de..d33c972 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 ff7ee56..4f16a36 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 99f3b54..10cca08 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 9a76ab7..12f68b8 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