aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-initializers1.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-10-10 16:00:14 +0000
committerUlrich Drepper <drepper@redhat.com>2007-10-10 16:00:14 +0000
commit59d430c6809871b357f2e9e677ef7fdfc03fbf62 (patch)
tree5351e0a72e1895f59b4e4f553527dc80ab8cdac0 /nptl/tst-initializers1.c
parent5a01ab7b838c967ba38720136a71d8b89d5b79ce (diff)
downloadglibc-59d430c6809871b357f2e9e677ef7fdfc03fbf62.zip
glibc-59d430c6809871b357f2e9e677ef7fdfc03fbf62.tar.gz
glibc-59d430c6809871b357f2e9e677ef7fdfc03fbf62.tar.bz2
* sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
libc.so just clear NAME. (__libc_rwlock_fini): Nop inside of libc.so. * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is all zeros.
Diffstat (limited to 'nptl/tst-initializers1.c')
-rw-r--r--nptl/tst-initializers1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nptl/tst-initializers1.c b/nptl/tst-initializers1.c
index 9036e6e..d30e885 100644
--- a/nptl/tst-initializers1.c
+++ b/nptl/tst-initializers1.c
@@ -47,5 +47,12 @@ main (void)
if (rwl_writer.__data.__flags
!= PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)
return 6;
+ /* <bits/libc-lock.h> __libc_rwlock_init definition for libc.so
+ relies on PTHREAD_RWLOCK_INITIALIZER being all zeros. If
+ that ever changes, <bits/libc-lock.h> needs updating. */
+ size_t i;
+ for (i = 0; i < sizeof (rwl_normal); i++)
+ if (((char *) &rwl_normal)[i] != '\0')
+ return 7;
return 0;
}