aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_rwlock_init.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-08-22 17:58:04 -0700
committerUlrich Drepper <drepper@redhat.com>2009-08-22 17:58:04 -0700
commitcd16986ee3a4fa92c7e6b3f5a601a635a7cdd21a (patch)
tree2d7e0db615f72fa98a21fe806204e49e0a0c2a04 /nptl/pthread_rwlock_init.c
parent15efafdf07789322219cc8f938ac758f932fe208 (diff)
downloadglibc-cd16986ee3a4fa92c7e6b3f5a601a635a7cdd21a.tar
glibc-cd16986ee3a4fa92c7e6b3f5a601a635a7cdd21a.tar.gz
glibc-cd16986ee3a4fa92c7e6b3f5a601a635a7cdd21a.tar.bz2
glibc-cd16986ee3a4fa92c7e6b3f5a601a635a7cdd21a.zip
Rvert accidental checkins.
Diffstat (limited to 'nptl/pthread_rwlock_init.c')
-rw-r--r--nptl/pthread_rwlock_init.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/nptl/pthread_rwlock_init.c b/nptl/pthread_rwlock_init.c
index 95d9da4005..27f25ac2ab 100644
--- a/nptl/pthread_rwlock_init.c
+++ b/nptl/pthread_rwlock_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -37,7 +37,13 @@ __pthread_rwlock_init (rwlock, attr)
iattr = ((const struct pthread_rwlockattr *) attr) ?: &default_attr;
- memset (rwlock, '\0', sizeof (*rwlock));
+ rwlock->__data.__lock = 0;
+ rwlock->__data.__nr_readers = 0;
+ rwlock->__data.__readers_wakeup = 0;
+ rwlock->__data.__writer_wakeup = 0;
+ rwlock->__data.__nr_readers_queued = 0;
+ rwlock->__data.__nr_writers_queued = 0;
+ rwlock->__data.__writer = 0;
rwlock->__data.__flags
= iattr->lockkind == PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP;
@@ -68,6 +74,9 @@ __pthread_rwlock_init (rwlock, attr)
header.private_futex));
#endif
+ rwlock->__data.__pad1 = 0;
+ rwlock->__data.__pad2 = 0;
+
return 0;
}
strong_alias (__pthread_rwlock_init, pthread_rwlock_init)