summaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-01-04 14:49:08 +0100
committerAndreas Schwab <schwab@redhat.com>2010-01-04 14:49:08 +0100
commit16a7541439c5ae36181e7f454b5a81f8c25aecf4 (patch)
treefca6aa176c1479ed6c3b792692473675b5ab4613 /nptl
parent600f9723fc372c37adfa171aae8e1f62cb5d5bba (diff)
parentc10f8866e5b673b6f41dcb14c8ea319f5e545b1a (diff)
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog11
-rw-r--r--nptl/pthread_rwlock_init.c17
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c8
4 files changed, 17 insertions, 29 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index b0ba4b4f43..b79834a32c 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
+ call __gmon_start__.
+ * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
+
+2009-12-17 Ulrich Drepper <drepper@redhat.com>
+
+ * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
+ using memset.
+
2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
diff --git a/nptl/pthread_rwlock_init.c b/nptl/pthread_rwlock_init.c
index 27f25ac2ab..c0aa194107 100644
--- a/nptl/pthread_rwlock_init.c
+++ b/nptl/pthread_rwlock_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -37,13 +37,7 @@ __pthread_rwlock_init (rwlock, attr)
iattr = ((const struct pthread_rwlockattr *) attr) ?: &default_attr;
- 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;
+ memset (rwlock, '\0', sizeof (*rwlock));
rwlock->__data.__flags
= iattr->lockkind == PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP;
@@ -56,8 +50,8 @@ __pthread_rwlock_init (rwlock, attr)
0x80 in case private futexes are available and zero otherwise.
This leads to the following table:
- | pshared | result
- | shared private | shared private |
+ | pshared | result
+ | shared private | shared private |
------------+-----------------+-----------------+
!avail 0 | 0 0 | 0 0 |
avail 0x80 | 0x80 0 | 0 0x80 |
@@ -74,9 +68,6 @@ __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)
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
index 40d4d50c32..eb09b4aaa9 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
+++ b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for S/390.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it
@@ -67,8 +67,6 @@ _init:\n\
.LT1_0:\n\
.LC13:\n\
.long __pthread_initialize_minimal_internal-.LT1_0\n\
-.LC14:\n\
- .long __gmon_start__@GOT\n\
.LC15:\n\
.long _GLOBAL_OFFSET_TABLE_-.LT1_0\n\
.LTN1_0:\n\
@@ -80,12 +78,6 @@ _init:\n\
L 1,.LC13-.LT1_0(13)\n\
LA 1,0(1,13)\n\
BASR 14,1\n\
- L 1,.LC14-.LT1_0(13)\n\
- L 1,0(1,12)\n\
- LTR 1,1\n\
- JE .L22\n\
- BASR 14,1\n\
-.L22:\n\
#APP\n\
.align 4,0x07\n\
END_INIT\n\
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
index a102d07d6c..34951f6fbb 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
+++ b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for 64 bit S/390.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it
@@ -68,12 +68,6 @@ _init:\n\
STG 1,0(15)\n\
LARL 12,_GLOBAL_OFFSET_TABLE_\n\
BRASL 14,__pthread_initialize_minimal_internal\n\
- LARL 1,__gmon_start__@GOTENT\n\
- LG 1,0(1)\n\
- LTGR 1,1\n\
- JE .L22\n\
- BASR 14,1\n\
-.L22:\n\
#APP\n\
.align 4,0x07\n\
END_INIT\n\