diff options
author | Roland McGrath <roland@gnu.org> | 2003-03-23 11:17:28 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2003-03-23 11:17:28 +0000 |
commit | 3045a1fe8969d56d1c2b1dbbe75a0a821b27c356 (patch) | |
tree | 8ec447bbab7e822641dfc61deed2090d2a3543fd /nptl | |
parent | 85047fe3b9a57c0de50692791b4c6f6301a49d1d (diff) | |
download | glibc-3045a1fe8969d56d1c2b1dbbe75a0a821b27c356.zip glibc-3045a1fe8969d56d1c2b1dbbe75a0a821b27c356.tar.gz glibc-3045a1fe8969d56d1c2b1dbbe75a0a821b27c356.tar.bz2 |
* Makeconfig (+includes): Don't use $(last-includes).
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 5 | ||||
-rw-r--r-- | nptl/tst-tls1.c | 10 | ||||
-rw-r--r-- | nptl/tst-tls2.c | 11 | ||||
-rw-r--r-- | nptl/tst-tls3.c | 8 | ||||
-rw-r--r-- | nptl/tst-tls3mod.c | 4 |
5 files changed, 37 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index cf973dd..2c8c142 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,10 @@ 2003-03-23 Roland McGrath <roland@redhat.com> + * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything. + * tst-tls3mod.c: Likewise. + * tst-tls1.c: Likewise. + * tst-tls2.c: Likewise. + * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke undefined behavior. diff --git a/nptl/tst-tls1.c b/nptl/tst-tls1.c index 86b3e6e..3668162 100644 --- a/nptl/tst-tls1.c +++ b/nptl/tst-tls1.c @@ -22,6 +22,7 @@ #include <stdlib.h> +#if HAVE___THREAD struct test_s { int a; @@ -51,11 +52,19 @@ 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"); @@ -85,6 +94,7 @@ do_test (void) } return 0; +#endif } diff --git a/nptl/tst-tls2.c b/nptl/tst-tls2.c index 8b06926..1d8ea14 100644 --- a/nptl/tst-tls2.c +++ b/nptl/tst-tls2.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include <unistd.h> +#if HAVE___THREAD #define N 10 static pthread_t th[N]; @@ -105,11 +106,18 @@ 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"); @@ -179,6 +187,7 @@ do_test (void) } return 0; +#endif } diff --git a/nptl/tst-tls3.c b/nptl/tst-tls3.c index a34862e..4e7ca8e 100644 --- a/nptl/tst-tls3.c +++ b/nptl/tst-tls3.c @@ -72,6 +72,13 @@ int nsigs; 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"); @@ -172,6 +179,7 @@ do_test (void) } return 0; +#endif } diff --git a/nptl/tst-tls3mod.c b/nptl/tst-tls3mod.c index 072b3f2..646f5b3 100644 --- a/nptl/tst-tls3mod.c +++ b/nptl/tst-tls3mod.c @@ -25,6 +25,8 @@ #include <unistd.h> +#if HAVE___THREAD + extern pthread_barrier_t b; #define TOTAL_SIGS 1000 @@ -79,3 +81,5 @@ tf (void *arg) return NULL; } + +#endif |