From 59d430c6809871b357f2e9e677ef7fdfc03fbf62 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 Oct 2007 16:00:14 +0000 Subject: * 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. --- nptl/tst-initializers1.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nptl/tst-initializers1.c') 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; + /* __libc_rwlock_init definition for libc.so + relies on PTHREAD_RWLOCK_INITIALIZER being all zeros. If + that ever changes, needs updating. */ + size_t i; + for (i = 0; i < sizeof (rwl_normal); i++) + if (((char *) &rwl_normal)[i] != '\0') + return 7; return 0; } -- cgit v1.1