Commit Graph

1398 Commits

Author SHA1 Message Date
Andreas Schwab 2983d85ee5 Work around kernel rejecting valid absolute timestamps 2010-07-01 19:07:14 -07:00
Ulrich Drepper 72b6e8c85b Fix build with newer linker. 2010-07-01 19:03:29 -07:00
Takashi Yoshii 4bc93b3033 [sh] Fix incorrect location of ifndef for __ASSUME_FUTEX_CLOCK_REALTIME. 2010-06-14 16:56:22 -07:00
Ulrich Drepper 86a4c67fb9 Implement interfaces to set and get names of threads.
At least the Linux kernel provides field where the kernel originally
stores the command which is executed by the thread.  The value can
subsequently be overwritten.  The added functions allow to do that for
threads, providing and abstraction around the syscalls or /proc file
system accesses needed.
2010-04-09 01:09:24 -07:00
Roland McGrath f571a994ce Move unwind-resume code from NPTL to sysdeps/gnu. 2010-04-05 20:07:39 -07:00
Luis Machado 7749bf5fe6 Enable common version of pthread_cond_timedwait to use clock_gettime in VDSO 2010-03-24 14:46:03 -07:00
Ulrich Drepper 1d78f2996d Fix a few more problem with the recent setxid changes. 2010-03-09 20:21:12 -08:00
Andreas Schwab 058e9ba9fd Revert to original version of setxid race fix 2010-03-08 17:02:46 +01:00
Ulrich Drepper 66f1b8eeb2 Fix setxid race with thread creation 2010-03-05 11:23:28 -08:00
Michal Schmidt 893549c5a0 Fix pthread_cond_*wait with requeue-PI on i386. 2010-01-15 18:09:14 -08:00
Ulrich Drepper 78ee218599 Actually define and export pthread_mutexattr_[sg]etrobust. 2010-01-14 16:46:32 -08:00
Ulrich Drepper 402cd98775 Actually define pthread_mutex_consistent. 2010-01-14 15:52:46 -08:00
Ulrich Drepper d3c7e68655 Fix up pthread.h for XPG7. 2010-01-12 12:13:04 -08:00
Ulrich Drepper f095bb7204 Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7.  This
exposed a few bugs in the headers.  There are more changes to come.
2010-01-09 10:56:41 -08:00
Thomas Schwinge d34bd80fce Fix s390 startup code in libpthread. 2009-12-22 08:37:33 -08:00
Ulrich Drepper f01c2359eb Small optimization of pthread_rwlock_init. 2009-12-17 13:49:36 -08:00
Dinakar Guniguntala 75956694f3 Add Requeue-PI support for x86 arch. 2009-12-13 11:50:16 -08:00
Ulrich Drepper 9554ebf2d4 Invalid timeouts in i386 sem_timedwait.
We adjusted nwaiters even though this isn't necessary.
2009-12-12 11:06:23 -08:00
Thomas Schwinge ebb92a491f SH calling __gmon_start__ from pt-initfini.c. 2009-11-30 06:24:22 -08:00
Andreas Schwab b55ec98c64 Fix infloop in __pthread_disable_asynccancel on x86_64 2009-11-27 21:37:30 -08:00
Ulrich Drepper 80b3a4ea1c New NPTL POSIX semaphore test. 2009-11-24 16:37:29 -08:00
Roland McGrath 57a299fe47 Use #include instead of duplication for i386 vs i686 dl-sysdep.h in NPTL. 2009-11-22 17:49:21 -08:00
Ulrich Drepper dfedb126d6 Minor optimizations and cleanups of x86 cond_broadcast. 2009-11-18 06:40:25 -08:00
Dinakar Guniguntala dd7106b3c6 Update cfi offsets for pthread_cond_broadcast and signal fir x86. 2009-11-18 06:33:23 -08:00
Ulrich Drepper 62616842ec Minimal unwind section size reduction. 2009-11-17 23:13:08 -08:00
Ulrich Drepper f8c10bb45b Use cfi directives in x86 pthread_cond_{,timed}wait. 2009-11-17 17:59:33 -08:00
Andreas Schwab 13f6812ffb Make name of libgcc_s library configurable 2009-11-03 23:52:01 +01:00
Ulrich Drepper 9c04f7c155 Fix aliasing problem in tst-sem11. 2009-10-30 09:35:20 -07:00
Daniel Jacobowitz 25db0f6ca9 Fix races in setXid implementation. 2009-10-30 01:00:44 -07:00
Andreas Schwab 3d60eb1734 Fix malformed #pragma. 2009-09-07 08:31:52 -07:00
Ulrich Drepper 01034d7590 Fix whitespaces. 2009-09-02 19:59:43 -07:00
Suzuki Poulose 38eb613663 Fix timer_create to initialize timer_t properly. 2009-09-02 19:58:50 -07:00
Andrew Stubbs 7812c65b90 SH lowlevellock broken for FUTEX_CLOCK_REALTIME. 2009-08-28 14:57:16 -07:00
Ulrich Drepper 84088310ce Handle AVX saving on x86-64 in interrupted smbol lookups.
If a signal arrived during a symbol lookup and the signal handler also
required a symbol lookup, the end of the lookup in the signal handler reset
the flag whether restoring AVX/SSE registers is needed.  Resetting means
in this case that the tail part of the outer lookup code will try to
restore the registers and this can fail miserably.  We now restore to the
previous value which makes nesting calls possible.
2009-08-25 10:42:30 -07:00
Ulrich Drepper b42a214c18 Hint to kernel that thread stack memory can be removed. 2009-08-24 16:23:47 -07:00
Ulrich Drepper 2d094b7395 More namespace cleanups. 2009-08-23 13:59:41 -07:00
Ulrich Drepper ae0d545003 Add CFI directives to x86-64 pthread_rwlock_unlock. 2009-08-11 20:47:36 -07:00
Ulrich Drepper 1bc2b97ee4 Add CFI directives to x86-64 pthread_rwlock_{rd,wr)lock. 2009-08-10 11:26:16 -07:00
Andreas Schwab ec4922395b Fix check for PI mutex in x86-64 pthread_cond_signal
Register eax contains the syscall number, use a different one instead.
2009-08-10 08:10:11 -07:00
Ulrich Drepper efa0569d2b Optimize x86-64 version of sem_timedwait. 2009-08-08 17:48:09 -07:00
Ulrich Drepper 49eea97b00 Another minor optimization of x86-64 pthread_cond_wait. 2009-08-08 10:21:46 -07:00
Ulrich Drepper 9083bcc5dc Small optimizations to cancellable x86-64 code. 2009-08-07 20:36:53 -07:00
Ulrich Drepper 421665c40a Optimize x86-64 syscall cancellation handling.
The syscall wrappers had to save and restore the syscall parameter
values and return value when calling the functions to enable/disable
cancellation were called.  Not anymore.  The called functions are
special and don't modify any unexpected registers.
2009-08-04 11:03:46 -07:00
Ulrich Drepper bd03a1afa2 Macro cleanup.
Better definition of the *_NITSET macros.
2009-07-31 22:30:30 -07:00
Ulrich Drepper 586fa886ad Fix x86-64 TCB alignment for future processor versions. 2009-07-29 09:01:04 -07:00
Ulrich Drepper b48a267b8f Preserve SSE registers in runtime relocations on x86-64.
SSE registers are used for passing parameters and must be preserved
in runtime relocations.  This is inside ld.so enforced through the
tests in tst-xmmymm.sh.  But the malloc routines used after startup
come from libc.so and can be arbitrarily complex.  It's overkill
to save the SSE registers all the time because of that.  These calls
are rare.  Instead we save them on demand.  The new infrastructure
put in place in this patch makes this possible and efficient.
2009-07-29 08:33:03 -07:00
Ulrich Drepper b0948ffdcb Fix bookkeeping in mutex when using requeue_pi. 2009-07-28 09:40:39 -07:00
Ulrich Drepper e73e694e38 pthread_mutex_unlock needs to use _rel semantics for atomic ops. 2009-07-27 13:46:56 -07:00
Ulrich Drepper 052757bfa6 Revert "Memory ordering in pthread_mutex_{,timed}lock."
This reverts commit 7b7f43bed1.
2009-07-27 13:43:01 -07:00
Ulrich Drepper 7b7f43bed1 Memory ordering in pthread_mutex_{,timed}lock.
All commits should have happened before the mutex lock is taken.
Therefore use the _rel variant of the cmpxchg atomic op.
2009-07-26 13:00:04 -07:00
Ulrich Drepper 01b597da40 Check for .cfi_{personality,lsda} on x86-64.
We need this support in NPTL now to avoid the hand-coded tables.
2009-07-23 17:15:56 -07:00
Ulrich Drepper f1adf1f490 Fix pthread_cond_timedwait error handling on old kernels. 2009-07-23 16:39:06 -07:00
Ulrich Drepper c3db953c16 Minor optimizations of last x86-64 condvar changes. 2009-07-20 08:39:47 -07:00
Ulrich Drepper 42e69bcf11 Support requeueing for condvars using PI mutex. x86-64 only.
Add support for the new FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI
options of futex.
2009-07-19 20:56:40 -07:00
Ulrich Drepper 515a8908ce Make x86-64 pthread_cond_timedwait more robust.
It just happens that __pthread_enable_asynccancel doesn't modify the $rdi
register.  But this isn't guaranteed.  Hence we reload the register after
the calls.
2009-07-19 14:54:56 -07:00
Ulrich Drepper e2dca2fea3 Extend x86-64 __lll_robust_timedlock_wait to use futex syscall with absolute timeout. 2009-07-19 00:00:17 -07:00
Ulrich Drepper 3d77b2687f Add more sem_timedwait tests. 2009-07-18 22:07:25 -07:00
Ulrich Drepper 32c6c342b6 Extend x86-64 pthread_rwlock_timedrdlock to use futex syscall with absolute timeout. 2009-07-18 21:53:26 -07:00
Ulrich Drepper d979611eb9 Extend x86-64 pthread_rwlock_timedwrlock to use futex syscall with absolute timeout. 2009-07-18 21:35:33 -07:00
Ulrich Drepper f8b6cd2182 Extend pthread_cond_timedwait tests. 2009-07-18 12:45:27 -07:00
Ulrich Drepper e88726b483 Extend x86-64 pthread_cond_timedwait to use futex syscall with absolute timeout. 2009-07-18 12:44:12 -07:00
Ulrich Drepper 92618c954f Optimize x86-64 pthread_cond_timedwait.
Instead of actively registering an unwind buffer we now use the
exception handling functionality of the gcc runtime.
2009-07-18 08:53:18 -07:00
Ulrich Drepper 30b1954abb Optimize x86-64 pthread_cond_wait.
Instead of actively registering an unwind buffer we now use the
exception handling functionality of the gcc runtime.
2009-07-18 08:09:39 -07:00
Ulrich Drepper f351f2b756 Extend x86-64 sem_timedwait to use futex syscall with absolute timeout. 2009-07-17 19:08:54 -07:00
Ulrich Drepper aee2665a17 Replace hand-coded unwind tables from x86-64 sem_timedwait. 2009-07-17 16:26:06 -07:00
Ulrich Drepper 0adae46817 Optimize x86-64 sem_wait for uncontested semaphore. 2009-07-17 15:50:23 -07:00
Ulrich Drepper c3c2f3cf56 Replace hand-coded unwind tables from x86-64 sem_wait. 2009-07-17 15:31:36 -07:00
Ulrich Drepper 63601ccd16 Replace hand-coded unwind tables from x86-64 pthread_once. 2009-07-17 14:45:08 -07:00
Ulrich Drepper d52c96e73a Replace hand-coded unwind tables from x86-64 pthread_cond_wait. 2009-07-17 12:14:09 -07:00
Ulrich Drepper bfdb73e145 Implement pthread_sigqueue.
The kernel from 2.3.31 on supports the rt_tgsigqueueinfo syscall.
Use it to implement the non-standard extension which, like
sigqueue, can pass additional data to the receiving thread.
2009-06-12 08:34:02 -07:00
Bryan Kadzban 1828530f09 Fix futex syscall parameter for x86 absolute timeout waits.
This affects only installations compiled for kernels older than 2.6.18.
2009-06-11 11:32:51 -07:00
Ulrich Drepper e20c4ef0ef libc-cancellation.c cleanup.
The unrelated function __libc_cleanup_routine should not be in
this file.  Move it into its own file.
2009-05-16 15:04:27 -07:00
Ulrich Drepper cba0ca7925 Unify source for async cancel handling.
Unify all three places where we enable async cancellation for
syscalls.  Optimize a bit.
2009-05-16 14:55:59 -07:00
Ulrich Drepper a5b8b56df7 Rename nptl/init.c to nptl/nptl-init.c.
Needed to allow overwriting architectures init.c in csu and nptl
individually.  Fixes BZ #9924.
2009-05-16 08:57:49 -07:00
Ulrich Drepper 6dd78596d5 ChangeLog entries incorrectly applied. 2009-05-15 21:03:49 -07:00
Jakub Jelinek 1f3615a1c9 Add missing export of fallocate64 on 32-bit platforms.
Due to a pasto the fallocate64 interface, introduced in glibc 2.10,
isn't exported for 32-bit Linux platforms.  It is too late for this
now so exported them for glibc 2.11.
2009-05-15 21:00:09 -07:00
Jakub Jelinek 9e471dad8e Don't try to cleanup libselinux and libaudit.
Because we are not shutting down the other threads first another
thread might work on a query before the process shuts down.  In this
case the now uninitialized libselinux and libaudit might be used.
Just don't free the resources.  It's not necessary anyway because
the process is about to terminate.
2009-05-15 20:48:08 -07:00
Ulrich Drepper 9437b427ce Fix change to prevent cancel signal in unsafe places.
The bits tested to decide when to delay the return when switching
off async cancel mode were wrong.  Fix that.  Also close a race
condition in pthread_cancel where the bit indicating the cancellation
is unconditionally set even if the cancel type might have changed.
2009-05-15 20:42:36 -07:00
Ulrich Drepper 1a7f254b4b No cancel signal in unsafe places.
When disabling async cancellation we cannot return from the function
call if the thread is canceled.  This happens when the cancel bits
have been set before async cancel is disabled but the signal hasn't
been sent/received yet.  Delay for as long as necessary since
otherwise the signal might be received in an unsafe context.
2009-05-15 19:37:12 -07:00
Jakub Jelinek 40de0fe350 Add missing CHangeLog entry.
2009-01-07  Ulrich Drepper  <drepper@redhat.com>

	* (in_flight_stack): New variable.
	(stack_list_del): New function.  Use instead of list_del.
	(stack_list_add): New function.  Use instead of list_add when adding to
	stack_cache and stack_used lists.
	(__reclaim_stacks): Complete operations on stack_cache and stack_used lists
	when the fork call interrupted another thread.
2009-04-29 18:04:10 +00:00
Ulrich Drepper d5c157a978 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
is available.
	* libc-cancellation.c (__libc_disable_asynccancel): Likewise.
	* sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
	* sysdeps/i386/tls.h: Likewise.
	(tcbhead_t): Add __private_tm member.
2009-04-27 21:55:49 +00:00
Ulrich Drepper 5efe86507d * sem_open.c (sem_open): Rewrite initialization of initsem to
avoid warnings.
2009-04-26 18:37:05 +00:00
Ulrich Drepper f521be31b9 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
Avoid warning by using may_alias attribute on ptrhack.
2009-04-26 18:06:47 +00:00
Ulrich Drepper 5497de87c9 [BZ #9963]
2009-04-22  Ulrich Drepper  <drepper@redhat.com>
	[BZ #9963]
	* locales/en_PH: Fix LC_PAPER.
	* locales/es_CL: Likewise.
	* locales/es_CO: Likewise.
	* locales/es_MX: Likewise.
	* locales/es_US: Likewise.
	* locales/es_VE: Likewise.
	* locales/fil_PH: Likewise.
	* locales/ik_CA: Likewise.
	* locales/iu_CA: Likewise.
	* locales/tl_PH: Likewise.
2009-04-23 04:30:42 +00:00
Ulrich Drepper d301a6e167 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
Check policy and priority for validity.
	Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2009-04-23 02:29:18 +00:00
Ulrich Drepper 71a5bd3e17 [BZ #5807]
2009-03-15  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5807]
	* string/strlen.c (strlen): Fix omission in the expression to test
	for NUL bytes.
2009-03-15 09:03:38 +00:00
Ulrich Drepper 30991b8bd9 * init.c (nptl_freeres): Compile only for SHARED. 2009-03-10 22:03:24 +00:00
Jakub Jelinek 9920a6b8db * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and 
FUTEX_BITSET_MATCH_ANY.
2009-03-09  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
	FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
	FUTEX_BITSET_MATCH_ANY.
2009-03-09 14:19:53 +00:00
Roland McGrath e965d5147e * Makeconfig (%.v.i): Depend on Makeconfig.
Exclude % lines from initial #-comment removal.
2009-02-28 02:26:51 +00:00
Ulrich Drepper 6cbe890a9d * wctype/wctype.h: The *_l functions are in POSIX 2008.
* wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
	wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
	wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
	* sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
	200112L to 200809L.
	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
	* posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT entries.
	* bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT.
	* posix/unistd.h: fexecve is in POSIX 2008.
	* time/time.h: strftime_l is in POSIX 2008.
	* io/sys/stat.h: futimens is in POSIX 2008.
	* string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
	* string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
	strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
	* stdlib/stdlib.h: mkdtemp is in POSIX 2008.
2009-02-26 16:53:30 +00:00
Ulrich Drepper 77db439eaf * ctype/ctype.h: The *_l functions are in POSIX 2008.
* dirent/dirent.h: alphasort, dirfd, scandir, and fdopendir are in
	POSIX 2008.
	/proc/sys/kernel/rtsig_max doesn't exist anymore, use getrlimit
2009-02-26 02:23:50 +00:00
Ulrich Drepper 5be0a68819 * sysdeps/unix/sysv/linux/sysconf.c (__sysconf):
/proc/sys/kenrel/rtsig_max doesn't exist anymore, use getrlimit
	instead.
2009-02-24 23:34:08 +00:00
Ulrich Drepper 4c869eb67e * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2009-02-13 23:36:40 +00:00
Ulrich Drepper 7f901dd7ca * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
pointer variables.
2009-01-29 20:52:36 +00:00
Ulrich Drepper cca50323b6 * allocatestack.c (__free_stacks): Renamed from free_stacks.
(__free_stack_cache): Removed.  Change callers to call __free_stacks.
	* init.c (nptl_freeres): New function.
	(pthread_functions): Initialize ptr_freeres to nptl_freeres.
	* pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
	* sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
	variable.
	(pthread_cancel_init): Depend in libgcc_s_handle for decision to
	load DSO.  Assign last.
	(__unwind_freeres): New function.

	* allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
	for better debugging.  No need to use stack_list_add here.
2009-01-29 20:38:04 +00:00
Ulrich Drepper a7bd183ffe * sysdeps/unix/sysv/linux/sh/sysdep.h (INTERNAL_SYSCALL):
Add "t" to clobber list.
	(INTERNAL_SYSCALL_NCS): Likewise.
2009-01-28 16:11:36 +00:00
Ulrich Drepper 563ee1cb34 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out. 2009-01-25 17:58:06 +00:00
Ulrich Drepper f25c7b087f * sysdeps/pthread/list.h (list_add): Initialize new element first.
(list_add_tail): Removed.
2009-01-08 18:32:16 +00:00
Ulrich Drepper 3c612057ae * init.c (__pthread_initialize_minimal_internal): Optimize test
FUTEX_CLOCK_REALTIME a bit.
2009-01-04 18:10:04 +00:00
Ulrich Drepper a9fa090b02 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2009-01-03 23:18:50 +00:00
Ulrich Drepper 19834b42f6 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
only passing five parameters to FUTEX_WAIT_BITSET call.

	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
	(__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_READTIME
	instead of computing relative timeout.
2009-01-03 23:18:34 +00:00
Ulrich Drepper cbd8aeb836 * init.c (__pthread_initialize_minimal_internal): Check for
FUTEX_CLOCK_REALTIME flag.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
	Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_READTIME instead of computing
	relative timeout.
2009-01-03 05:06:46 +00:00
Ulrich Drepper 7dd650d7fc * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2009-01-03 03:45:07 +00:00
Ulrich Drepper 217d45cd35 * sysdeps/x86_64/bits/select.h: New file. 2008-12-29 20:16:11 +00:00
Ulrich Drepper 6de79a4991 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
fast path here, for robust/PI/PP mutexes call
	__pthread_mutex_lock_full.  Don't use switch, instead use a series
	of ifs according to their probability.
	(__pthread_mutex_lock_full): New function.
	* pthread_mutex_unlock.c: Include assert.h.
	(__pthread_mutex_unlock_usercnt): Handle only the
	fast path here, for robust/PI/PP mutexes call
	__pthread_mutex_unlock_full.  Don't use switch, instead use a series
	of ifs according to their probability.
	(__pthread_mutex_unlock_full): New function.
	* sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
	(__pthread_mutex_lock_full): Define.
2008-12-12 18:46:28 +00:00
Ulrich Drepper 71bb26394a * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
implementation.  Add necessary padding and.
	* descr.h (struct pthread): Increase padding for tcbhead_t to 24
	words.
2008-12-08 23:30:25 +00:00
Jakub Jelinek d43b8bddb1 Move 2 ChangeLog entries to correct ChangeLog.
2008-11-24  Arkadiusz Miśkiewicz  <arekm@maven.pl>

	* sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Use LOAD_PIC_REG
	instead of doing things manually.

2008-11-26  Chris Steel  <chris.steel.lnx@googlemail.com>

	* posix/regex_internal.h (build_wcs_upper_buffer):
	Return type is reg_error_t.
2008-12-08 11:32:58 +00:00
Ulrich Drepper 71885b7a91 * sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Use LOAD_PIC_REG
instead of doing things manually.
2008-12-06 00:15:34 +00:00
Ulrich Drepper 261d16fece * posix/regex_internal.h (build_wcs_upper_buffer):
Return type is reg_error_t.
2008-12-06 00:13:04 +00:00
Ulrich Drepper 247626f37e * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
and FUTEX_WAKE_BITSET.
2008-12-05 22:05:24 +00:00
Ulrich Drepper da5ac1352d * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname3_r): Recognize
ESRCH return value.
	(_nss_dns_gethostbyname4_r): Likewise.
	* resolv/res_init.c (__res_vinit): Initialize nscount to zero.
	* sysdeps/posix/getaddrinfo.c (gaih_inet): In case we use
	gethostbyname4_r, we don't have a separate IPv6 status, so copy
	the no_data variable.
2008-12-03 07:30:39 +00:00
Roland McGrath c0439b95b8 Moved alpha to ports repository.
2008-11-25  Roland McGrath  <roland@redhat.com>

	* sysdeps/alpha, sysdeps/unix/bsd/osf/alpha,
	sysdeps/unix/bsd/Attic/osf1/alpha, sysdeps/unix/sysv/linux/alpha,
	sysdeps/unix/sysv/linux/alpha/alpha, sysdeps/unix/alpha,
	sysdeps/mach/alpha, sysdeps/mach/hurd/alpha:
	Subdirectories moved to ports repository.
	* configure.in (base_machine): Remove alpha case.
2008-11-26 07:26:32 +00:00
Ulrich Drepper 0e54a7250f [BZ #7009] 2008-11-12 13:41:14 +00:00
Jakub Jelinek 4b23f9bda3 * bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_address,
__libc_tsd_get, __libc_tsd_set): Add TYPE argument, use it as the type 
of the thread variable instead of void *. 
* sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_define, 
__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Likewise. 
* include/ctype.h (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust 
__libc_tsd_define arguments. 
(__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Adjust 
__libc_tsd_address arguments.  Remove union hack. 
* include/rpc/rpc.h (RPC_VARS): Adjust __libc_tsd_define arguments. 
* sunrpc/rpc_thread.c (RPC_VARS): Likewise. 
(__rpc_thread_destroy, rpc_thread_multi, __rpc_thread_variables): 
Adjust __libc_tsd_{set,get} arguments. 
* ctype/ctype-info.c (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust 
__libc_tsd_define arguments. 
* locale/uselocale.c (__uselocale): Adjust __libc_tsd_{set,get} 
arguments. 
* locale/lc-ctype.c (_nl_postload_ctype): Likewise. 
* locale/global-locale.c (__libc_tsd_LOCALE): Adjust type. 
(LOCALE): Adjust __libc_tsd_define arguments. 
* locale/localeinfo.h (_NL_CURRENT_LOCALE): Adjust __libc_tsd_get 
arguments. 
(LOCALE): Adjust __libc_tsd_define arguments. 
* sysdeps/mach/hurd/malloc-machine.h (MALLOC): Adjust __libc_tsd_define 
arguments. 
(tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} 
arguments. nptl/ 
* sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define 
arguments. 
(tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} 
arguments.
2008-11-07  Jakub Jelinek  <jakub@redhat.com>

	* bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_address,
	__libc_tsd_get, __libc_tsd_set): Add TYPE argument, use it as the type
	of the thread variable instead of void *.
	* sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_define,
	__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Likewise.
	* include/ctype.h (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust
	__libc_tsd_define arguments.
	(__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Adjust
	__libc_tsd_address arguments.  Remove union hack.
	* include/rpc/rpc.h (RPC_VARS): Adjust __libc_tsd_define arguments.
	* sunrpc/rpc_thread.c (RPC_VARS): Likewise.
	(__rpc_thread_destroy, rpc_thread_multi, __rpc_thread_variables):
	Adjust __libc_tsd_{set,get} arguments.
	* ctype/ctype-info.c (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust
	__libc_tsd_define arguments.
	* locale/uselocale.c (__uselocale): Adjust __libc_tsd_{set,get}
	arguments.
	* locale/lc-ctype.c (_nl_postload_ctype): Likewise.
	* locale/global-locale.c (__libc_tsd_LOCALE): Adjust type.
	(LOCALE): Adjust __libc_tsd_define arguments.
	* locale/localeinfo.h (_NL_CURRENT_LOCALE): Adjust __libc_tsd_get
	arguments.
	(LOCALE): Adjust __libc_tsd_define arguments.
	* sysdeps/mach/hurd/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
	arguments.
	(tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
	arguments.
2008-11-07 15:07:10 +00:00
Ulrich Drepper efac1fce62 [BZ #6955]
2008-11-01  Ulrich Drepper  <drepper@redhat.com>
	[BZ #6955]
	* pthread_mutex_lock.c: Add support for private PI mutexes.
	* pthread_mutex_timedlock.c: Likewise.
	* pthread_mutex_trylock.c: Likewise.
	* pthread_mutex_unlock.c: Likewise.
	Patch mostly by Ben Jackson <ben@ben.com>.
2008-11-01 19:51:41 +00:00
Ulrich Drepper bf837fa36f [BZ #6843]
2008-10-31  Ulrich Drepper  <drepper@redhat.com>
	[BZ #6843]
	* sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
	Increase stack size for helper thread.
2008-11-01 00:20:07 +00:00
Ulrich Drepper 208bc83670 * misc/syslog.c (openlog_internal): Fix __have_sock_cloexec
initialization.
2008-10-22 21:45:13 +00:00
Ulrich Drepper 17f8b4a955 . 2008-10-06 16:48:17 +00:00
Andreas Jaeger 2458c74851 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
lll_robust_lock, lll_cond_lock, lll_robust_cond_lock, 
lll_timedlock, lll_robust_timedlock, lll_unlock, 
lll_robust_unlock): Promote private to int.
2008-09-08  Richard Guenther  <rguenther@suse.de>

	* sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
	lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
	lll_timedlock, lll_robust_timedlock, lll_unlock,
	lll_robust_unlock): Promote private to int.
2008-09-23 18:50:28 +00:00
Ulrich Drepper 965805e888 * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Define MAP_STACK.
* sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise.
2008-08-15 22:35:53 +00:00
Ulrich Drepper bd7f48571d * nscd/connections.c (nscd_init): Type if preprocessor directive.
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PACCEPT):
	Define.
2008-07-30 16:33:19 +00:00
Ulrich Drepper 619cc2f69d * scripts/gen-as-const.awk: Generate more widely usable code by
using 64-bit arithmetic.
2008-07-26 16:35:21 +00:00
Ulrich Drepper 8ccf22f934 * include/rpc/clnt.h: Declare __libc_clntudp_bufcreate and
__libc_clntudp_bufcreate_internal.
	* include/sys/socket.h: Declare __have_sock_cloexec.
	* socket/Makefile (aux): Add have_sock_cloexec.
	* socket/have_sock_cloexec.c: New file.
	* sunrpc/clnt_udp.h (clntudp_bufcreate): Now a wrapper around
	__libc_clntudp_bufcreate.
	(__libc_clntudp_bufcreate): Former implementation of clntudp_bufcreate
	which takes an additional parameter.  Create socket with non-blocking
	mode and close-on-exec flag set, if wanted.
	* sunrpc/Versions: Export __libc_clntudp_bufcreate@GLIBC_PRIVATE.
	* nis/ypclnt.c (yp_bind_client_create): Use __libc_clntpudp_bufcreate
	instead of clntudp_create.  The socket has already the close-on-exec
	flag set if SOCK_CLOEXEC is defined.
2008-07-25 17:06:50 +00:00
Ulrich Drepper 5a337776da * nscd/grpcache.c (cache_addgr): Correctly compute size of
fixed-size portion of the record.
	* nscd/servicescache.c (cache_addserv): Likewise.
	* nscd/pwdcache.c (cache_addpw): Likewise.
	* nscd/initgrcache.c (addinitgroupsX): Likewise.
2008-06-12 16:16:38 +00:00
Ulrich Drepper e4d6e7f5c0 * sysdeps/pthread/pthread.h: Fix typo in comment. 2008-05-29 14:53:01 +00:00
Ulrich Drepper d6296e885d * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
of CPU set to the kernel.
2008-05-29 05:53:30 +00:00
Ulrich Drepper 62605cbfcb Remove useless more "if" tests before "free".
* include/inline-hashtab.h (htab_delete): Likewise.
	* libio/freopen.c (freopen): Likewise.
	* libio/freopen64.c (freopen64): Likewise.
	* locale/programs/ld-collate.c (collate_read): Likewise.
	* misc/fstab.c (libc_freeres_fn): Likewise.
	* posix/glob.c (globfree): Likewise.
2008-05-27 06:04:07 +00:00
Ulrich Drepper 4b2c85c0b9 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
David S. Miller  <davem@davemloft.net>
2008-05-26 17:02:55 +00:00
Jakub Jelinek b72f5692e8 2008-05-20 Jakub Jelinek <jakub@redhat.com>
David S. Miller  <davem@davemloft.net>
	* sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2008-05-21 06:47:47 +00:00
Jakub Jelinek 3b15b590b7 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2008-05-19  Jakub Jelinek  <jakub@redhat.com>

	* elf/soinit.c (__EH_FRAME_BEGIN__): Remove.
2008-05-20 07:42:00 +00:00
Ulrich Drepper cdffaaa615 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
__pshared correctly.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
	Likewise.
	Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2008-05-11 05:42:25 +00:00
Jakub Jelinek 2313c48fa9 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
(__old_sem_wait): Fix argument to lll_futex_wait().
2008-04-14  David S. Miller  <davem@davemloft.net>

	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
	(__old_sem_wait): Fix argument to lll_futex_wait().
2008-04-15 15:00:30 +00:00
Ulrich Drepper 2f611ada05 [BZ #5209]
* sysdeps/unix/sysv/syscalls.list: times syscalls doesn't return
	an error value.
2008-04-09 18:47:07 +00:00
Jakub Jelinek d24be489a1 [BZ #6020]
* sysdeps/unix/sysv/linux/sparc/lowlevellock.h 
(lll_futex_wake_unlock): Add private argument to the pre-v9 macro. 
Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2008-04-08  Jakub Jelinek  <jakub@redhat.com>

	[BZ #6020]
	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h
	(lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
	Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2008-04-08 06:36:47 +00:00
Ulrich Drepper f96853beaf * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefined ARG_MAX if
<linux/limits.h> has defined it.
	* sysdeps/unix/sysv/linux/sys/param.h: Define NCARGS to the legacy
	ARG_MAX value and prevent ARG_MAX from being defined by the kernel
	headers.
	* sysdeps/unix/sysv/linux/sysconf.c: Define legacy_ARG_MAX and use
	it instead of ARG_MAX.
2008-03-27 15:20:38 +00:00
Jakub Jelinek 354b75277b * sysdeps/unix/sysv/linux/dl-sysdep.h: Use __ASSEMBLER__ instead
of ASSEMBLER. nptl/ 
* sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead 
of ASSEMBLER. 
* sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise. 
* sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2008-03-18  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/dl-sysdep.h: Use __ASSEMBLER__ instead
	of ASSEMBLER.
2008-03-17 23:41:58 +00:00
Ulrich Drepper 702ae32909 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
HAVE_DL_DISCOVER_OSVERSION.
	* sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2008-03-14 21:49:02 +00:00
Ulrich Drepper 443db17889 [BZ #5778]
* sysdeps/unix/sysv/linux/pathconf.h: Declare
	__statfs_chown_restricted.
	* sysdeps/unix/sysv/linux/fpathconf.c: Call __statfs_chown_restricted
	for _PC_CHOWN_RESTRICTED.
	* sysdeps/unix/sysv/linux/pathconf.c: Likewise.
	Implement __statfs_chown_restricted.
	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
	_POSIX_CHOWN_RESTRICTED value to zero.

2008-02-26  Harsha Jagasia  <harsha.jagasia@amd.com>
2008-03-08 01:57:18 +00:00
Roland McGrath 67fbfa5ca1 [BZ #5442]
* configure.in: Use -print-file-name if it yields a directory,
	for each of include and include-fixed.
	* configure: Regenerated.
2008-02-01 00:20:11 +00:00
Ulrich Drepper dd3113da54 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
unnecessary addr32 prefix.
2008-01-30 17:44:06 +00:00
Roland McGrath 16cd816fd0 * Makeconfig (sysd-rules-patterns): New variable.
* Makerules ($(common-objpfx)sysd-rules): Drive the loop from that.
	(check-inhibit-asm): New canned sequence, replaces ...
	(open-check-inhibit-asm, close-check-inhibit-asm): ... these, removed.
	* elf/rtld-Rules ($(objpfx)rtld-%.os): Use $(rtld-CPPFLAGS) in commands.
	(rtld-CPPFLAGS): Renamed from CPPFLAGS-rtld.
	(CFLAGS-rtld): Variable removed.
2008-01-30 00:24:16 +00:00
Ulrich Drepper b4b166af4f * sysdeps/i386/fpu/ftestexcept.c (fetestexcept): Use short for fnstsw. 2008-01-22 18:58:31 +00:00
Ulrich Drepper eaf95a2682 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
thread returns the program exits with an error code.
2008-01-15 20:15:10 +00:00
Ulrich Drepper ab355d9aa5 * pthread-errnos.sym: Add EOVERFLOW.
* sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
	* sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2008-01-10 18:34:43 +00:00
Ulrich Drepper b8cca206e2 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
parameter.  Passed it as permission to mmap.
	* allocatestack.c (allocate_stack): Pass prot as second parameter
	to ARCH_RETRY_MMAP.
2007-12-14 16:33:44 +00:00
Ulrich Drepper 3eb0e1c6d6 ..
* tst-basic7.c: Allocate memory for the stack.
2007-12-12 18:41:10 +00:00
Ulrich Drepper 58d1179512 [BZ #5463, BZ #5464]
* iconvdata/hp-thai8.c: New file.
	* iconvdata/Makefile: Add rules for hp-thai8.c.
	* iconvdata/tst-tables.sh: Add entry for HP-THAI8.
	* iconvdata/gconv-modules: Likewise.

	[BZ #5464]
	* iconvdata/hp-greek8.c: New file.
	* iconvdata/Makefile: Add rules for hp-greek8.c.
	* iconvdata/tst-tables.sh: Add entry for HP-GREEK8.
	* iconvdata/gconv-modules: Likewise.

	[BZ #5463]
	* iconvdata/hp-turkish8.c: New file.
	* iconvdata/Makefile: Add rules for hp-turkish8.c.
	* iconvdata/tst-tables.sh: Add entry for HP-TURKISH8.
	* iconvdata/gconv-modules: Likewise.
2007-12-12 08:07:33 +00:00
Ulrich Drepper 189dce4f6a [BZ #5465]
2007-12-12  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5465]
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
	(__pthread_cond_timedwait): Don't use VDSO.
2007-12-12 08:06:15 +00:00
Ulrich Drepper 26e21e7554 [BZ #5441, BZ #5452, BZ #5454]
2007-12-07  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5441]
	* stdio-common/vfscanf.c (_IO_vfwscanf): Don't free ptrs_to_free
	structure, it's allocated with alloca.
	* stdio-common/Makefile (tests): Add bug21.
	* stdio-common/bug21.c: New file.

2007-12-06  Aurelien Jarno  <aurelien@aurel32.net>

	[BZ #5452]
	* sysdeps/unix/sysv/linux/bits/sched.h: Use __extension__
	  keyword for gcc's braced-groups.

2007-12-07  Ulrich Drepper  <drepper@redhat.com>

	[BZ #5454]
	* inet/ether_line.c: Strip hostname of whitespaces.
	* inet/Makefile (tests): Add tst-ether_line.
	* inet/tst-ether_line.c: New file.
2007-12-07 16:50:11 +00:00
Ulrich Drepper 191ec77f9b * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
Store 2 before returning ETIMEDOUT.
2007-12-05 02:31:48 +00:00
Ulrich Drepper c012be6f99 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
Store 2 before returning ETIMEDOUT.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
	* sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
	(__lll_lock_wait_private): Optimize.
	(__lll_lock_wait): Likewise.
2007-11-24 01:16:53 +00:00
Ulrich Drepper 77f1e09a99 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
	g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2007-11-20 22:48:12 +00:00
Ulrich Drepper cbed6a607d [BZ #5240]
* sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
	If we time out, try one last time to lock the futex to avoid
	losing a wakeup signal.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2007-11-09 09:09:07 +00:00
Ulrich Drepper 0f7e0ee507 [BZ #5245]
2007-11-08  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5245]
	* sysdeps/pthread/createthread.c (do_clone): Translate clone error
	if necessary.
2007-11-08 17:24:34 +00:00
Ulrich Drepper f6ed654cab * sysdeps/x86_64/memset.S: Add sfence after movnti. 2007-11-08 01:07:04 +00:00
Ulrich Drepper b92e378086 * elf/rtld.c (dl_main): Use the page size to find the map start. 2007-11-06 01:12:33 +00:00
Ulrich Drepper 94a749f69a * time/tzfile.c (__tzfile_read): Fix check for version 0 data files.
Patch by Szymon Siwek <sls@poczta.wp.pl>.
2007-11-06 01:04:13 +00:00
Ulrich Drepper f160a450c9 [BZ #5204]
* crypt/sha256c-test.c: Define TIMEOUT to 6 for ancient hardware.
	* crypt/sha512c-test.c: Likewise.
2007-10-28 19:46:50 +00:00
Ulrich Drepper 94833f118b [BZ #5040]
* sysdeps/unix/sysv/linux/sys/epoll.h (EPOLLRDHUP): Add value.
2007-10-28 01:34:10 +00:00
Jakub Jelinek 96c06e084b * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
routine instead of an alias to __new_sem_post.
2007-10-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
	routine instead of an alias to __new_sem_post.
2007-10-17 14:34:44 +00:00
Jakub Jelinek e807818b5d * init.c (__pthread_initialize_minimal): Initialize word to appease
valgrind.
2007-10-15  Jakub Jelinek  <jakub@redhat.com>

	* init.c (__pthread_initialize_minimal): Initialize word to appease
	valgrind.
2007-10-15 20:25:25 +00:00
Ulrich Drepper 59d430c680 * 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.
2007-10-10 16:00:14 +00:00
Ulrich Drepper 221d9d8e76 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
(__pthread_cond_wait): Fix unlocking of internal lock after mutex
	unlocking failed.
	Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2007-09-02 16:53:13 +00:00
Ulrich Drepper 2a01ce56b7 [BZ #4938]
2007-08-21  Ulrich Drepper  <drepper@redhat.com>
	[BZ #4938]
	* allocatestack.c (__reclaim_stacks): Clear the TSD in the
	reclaimed stack if necessary.
	* Makefile (tests): Add tst-tsd6.
	* tst-tsd6.c: New file.
2007-08-21 23:55:36 +00:00
Jakub Jelinek c273641b45 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
Add private argument.
2007-08-21  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
	Add private argument.
2007-08-21 08:05:34 +00:00
Ulrich Drepper fb84593c43 * csu/libc-start.c: Don't handle VDSO_SETUP here.
* sysdeps/unix/sysv/linux/init-first.c: Handle it here instead.
	* sysdeps/unix/sysv/linux/x86_64/libc-start.c: Renamed to...
	* sysdeps/unix/sysv/linux/x86_64/init-first.c: ...this.  New file.
	* sysdeps/unix/sysv/linux/powerpc/libc-start.c: Move VDSO_SETUP code
	to...
	* sysdeps/unix/sysv/linux/x86_64/init-first.c: ...here.  New file.
2007-08-20 22:36:43 +00:00
Jakub Jelinek 3e8d1eabc9 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
(__lll_robust_timedlock): Pass private as last argument to 
__lll_robust_timedlock_wait. 
(__lll_unlock): Fix a pasto.
2007-08-16  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/lowlevellock.h
	(__lll_robust_timedlock): Pass private as last argument to
	__lll_robust_timedlock_wait.
	(__lll_unlock): Fix a pasto.
2007-08-16 21:03:08 +00:00
Jakub Jelinek e4720b0e59 * sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): Fix raising
FE_UNDERFLOW on Niagara CPUs.
	* sysdeps/sparc/fpu/feholdexcpt.c (feholdexcept): Clear all
	exceptions.

	* sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
	sparc_old_sem): New structs.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
	(__sem_wait_cleanup): New function.
	(__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
	decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
	Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
	lll_futex_wait.
	(__old_sem_wait): New function.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
	nptl/sysdeps/unix/sysv/linux/sparc version.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
	(__new_sem_trywait): Use sparc_old_sem structure.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
	(sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
	decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
	Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
	lll_futex_timed_wait.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
	Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
	isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
	lll_futex_wake.
	(__old_sem_post): New function.
	* sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2007-08-15  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): Fix raising
	FE_UNDERFLOW on Niagara CPUs.

	* sysdeps/sparc/fpu/feholdexcpt.c (feholdexcept): Clear all
	exceptions.
2007-08-15 20:47:43 +00:00
Ulrich Drepper d13f4a4386 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
(__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
	FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
	Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
	* sysdeps/unix/sysv/linux/shpthread_cond_signal.S
	(__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
	FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
	Use FUTEX_WAKE_OP.
	* sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
	kernel-features.h and tcb-offsets.h.
	(__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
	lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
	process private.
	* sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
	tcb-offsets.h.
	(__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
	to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
	process private.
	* sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
	__ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2007-08-15 06:41:22 +00:00
Jakub Jelinek 467d1345e0 * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup): No
need to check GLRO(dl_hwcap) & HWCAP_SPARC_FLUSH on sparcv9. 
(sparc_fixup_plt): Add do_flush argument instead of figuring whether 
flush should be used or not inside of the function. 
(elf_machine_fixup_plt, elf_machine_rela): Adjust caller.
	* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone,
	__thread_start): Use HIDDEN_JUMPTARGET.
	* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone,
	__thread_start): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h (JUMPTARGET): Define.
nptl/
	* sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
	* sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
	(__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
	lll_futex_timed_wait.
	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup): No
	need to check GLRO(dl_hwcap) & HWCAP_SPARC_FLUSH on sparcv9.
	(sparc_fixup_plt): Add do_flush argument instead of figuring whether
	flush should be used or not inside of the function.
	(elf_machine_fixup_plt, elf_machine_rela): Adjust caller.

	* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone,
	__thread_start): Use HIDDEN_JUMPTARGET.
	* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone,
	__thread_start): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h (JUMPTARGET): Define.
2007-08-14 19:59:35 +00:00
Jakub Jelinek 702a94146a * sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
Add libc_hidden_proto. 
(STRTOF): Add libc_hidden_proto. 
(___new_strtold_l, ___new_wcstold_l): New weak aliases. 
(strtold_l, wcstold_l): Use them as second argument for 
long_double_symbol. nptl/ 
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock, 
__lll_robust_unlock): Rewrite as macros instead of inline functions. 
* sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock, 
__lll_robust_unlock, __lll_wait_tid): Likewise.
2007-08-14  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
	Add libc_hidden_proto.
	(STRTOF): Add libc_hidden_proto.
	(___new_strtold_l, ___new_wcstold_l): New weak aliases.
	(strtold_l, wcstold_l): Use them as second argument for
	long_double_symbol.
2007-08-14 19:37:50 +00:00
Ulrich Drepper 22502ea2a7 * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PSELECT,
__ASSUME_PPOLL, __ASSUME_ATFCTS, __ASSUME_SET_ROBUST_LIST,
	__ASSUME_UTIMENSAT, __ASSUME_FALLOCATE): Update per-arch conditions
	when each feature was introduced.

	* sysdeps/unix/sysv/linux/dl-vdso.c: Don't include dl-hash.h.
	* sysdeps/unix/sysv/linux/dl-vdso.h: Don't include dl-hash.h if NDEBUG.
	(CHECK_HASH): New macro.
	(PREPARE_VERSION): Use it.

	* sysdeps/unix/sysv/linux/pselect.c (__generic_pselect): Only provide
	prototype if not __ASSUME_PSELECT.
	* sysdeps/unix/sysv/linux/ppoll.c (__generic_ppoll): Only provide
	prototype if not __ASSUME_PPOLL.

	* sysdeps/unix/sysv/linux/dl-osinfo.h (ROUND): #undef after use.

	* sysdeps/unix/clock_settime.c (freq, __pthread_clock_settime,
	hp_timing_settime): Don't define or declare if HANDLED_CPUTIME
	is defined.
2007-08-14 03:21:23 +00:00
Ulrich Drepper 4baf59ada8 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file. 2007-08-13 22:16:45 +00:00
Ulrich Drepper 9c6f6953fd * sysdeps/unix/sysv/linux/x86_64/libc-start.c
(_libc_vdso_platform_setup): If vDSO is not available point
	__vdso_gettimeofday to the vsyscall.
	* sysdeps/unix/sysv/linux/x86_64/gettimeofday.S [SHARED]: Use
	__vdso_gettimeofday instead of vsyscall.
2007-08-13 18:47:42 +00:00
Ulrich Drepper 974a1f0fb2 * sysdeps/unix/sysv/linux/powerpc/libc-start.c 2007-08-12 20:13:07 +00:00
Ulrich Drepper f47e262624 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
<kernel-features.h>.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2007-08-12 17:43:15 +00:00
Ulrich Drepper 5bd8a24966 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
* pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
	dealing with robust mutexes.
	* pthread_mutex_timedlock.c: Likewise.
	* pthread_mutex_trylock.c: Likewise.
	* pthread_mutex_unlock.c: Likewise.
	* sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.

2007-08-06  Jakub Jelinek  <jakub@redhat.com>

	* pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
	(PTHREAD_MUTEX_TYPE): Mask __kind with 127.
	(PTHREAD_MUTEX_PSHARED): Define.
	* pthread_mutex_init.c (__pthread_mutex_init): Set
	PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
	mutexes.
	* pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
	instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
	as second argument to lll_lock.
	(LLL_MUTEX_TRYLOCK): Take mutex as argument
	instead of its __data.__lock field.
	(LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
	__data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
	to lll_robust_lock.
	(__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
	LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
	instead of mutex->__data.__kind directly, pass
	PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
	* pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
	PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
	directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
	(pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
	to lll_timedlock, lll_robust_timedlock, lll_unlock and
	lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
	of mutex->__data.__kind directly.
	* pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
	PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
	lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
	PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
	* pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
	PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
	and lll_futex_wake.
	* pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
	PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
	Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
	directly.
	* sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
	Take mutex as argument instead of its __data.__lock field, pass
	PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
	(LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
	__data.__lock field.
	(LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
	__data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
	to lll_robust_cond_lock.
	* pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
	variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
	lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
	has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
	* pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
	variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
	lll_futex_wait.
	* pthread_cond_signal.c (__pthread_cond_signal): Add pshared
	variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
	lll_futex_wake.
	* pthread_cond_timedwait.c (__pthread_cond_wait): Add
	pshared variable, pass it to lll_lock, lll_unlock,
	lll_futex_timedwait and lll_futex_wake.
	* pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
	pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
	and lll_futex_wake.
	* sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
	lll_futex_wake_unlock): Add private argument, use __lll_private_flag
	macro.
	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
	lll_futex_wake_unlock): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
	lll_futex_wake_unlock): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
	lll_futex_wake_unlock): Likewise.
	(lll_futex_wake): Fix a typo.
	* sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
	(__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
	FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
	Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
	(__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
	FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
	(__pthread_cond_timedwait): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
	(__condvar_cleanup, __pthread_cond_wait): Likewise.
2007-08-11 18:50:51 +00:00
Jakub Jelinek 0470fa4610 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
Don't use CGOTSETUP and CGOTRESTORE macros. 
(CGOTSETUP, CGOTRESTORE): Remove. 
<IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to 
@local symbol.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S (__socket):
	Don't use CGOTSETUP and CGOTRESTORE macros.
2007-08-05  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S (__socket):
	Don't use CGOTSETUP and CGOTRESTORE macros.
2007-08-05 13:43:20 +00:00
Ulrich Drepper 64f6281cbb * stdlib/strtod_l.c (____STRTOF_INTERNAL): Properly handle -0.
* stdlib/Makefile (tests): Add tst-strtod5.
	(tst-strtod5-ENV): New.
	* stdlib/tst-strtod5.c: New file.
2007-08-03 16:45:47 +00:00
Ulrich Drepper e51deae7f6 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
	atomic_full_barrier.

2007-07-31  Jakub Jelinek  <jakub@redhat.com>

	* allocatestack.c (stack_cache_lock): Change type to int.
	(get_cached_stack, allocate_stack, __deallocate_stack,
	__make_stacks_executable, __find_thread_by_id, __nptl_setxid,
	__pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
	as second argument to lll_lock and lll_unlock macros on
	stack_cache_lock.
	* pthread_create.c (__find_in_stack_list): Likewise.
	(start_thread): Similarly with pd->lock.  Use lll_robust_dead
	macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
	as second argument.
	* descr.h (struct pthread): Change lock and setxid_futex field
	type to int.
	* old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
	LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
	* old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
	* old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
	Likewise.
	* old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
	* pthread_cond_init.c (__pthread_cond_init): Likewise.
	* pthreadP.h (__attr_list_lock): Change type to int.
	* pthread_attr_init.c (__attr_list_lock): Likewise.
	* pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
	ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
	lll_{,un}lock.
	* pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
	also for lll_futex_{wake,wait}.
	* pthread_barrier_init.c (pthread_barrier_init): Make iattr
	a pointer to const.
	* pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
	LLL_SHARED as second argument to lll_{,un}lock.
	* pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
	* pthread_cond_signal.c (__pthread_cond_singal): Likewise.
	* pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
	* pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
	Likewise.
	* pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
	as second argument to lll_{,un}lock macros on pd->lock.
	* pthread_getschedparam.c (__pthread_getschedparam): Likewise.
	* pthread_setschedparam.c (__pthread_setschedparam): Likewise.
	* pthread_setschedprio.c (pthread_setschedprio): Likewise.
	* tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
	Likewise.
	* sysdeps/pthread/createthread.c (do_clone, create_thread):
	Likewise.
	* pthread_once.c (once_lock): Change type to int.
	(__pthread_once): Pass LLL_PRIVATE as second argument to
	lll_{,un}lock macros on once_lock.
	* pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
	lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
	rwlock->__data.__shared as second argument to them and similarly
	for lll_futex_w*.
	* pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
	Likewise.
	* pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
	Likewise.
	* pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
	* pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
	* pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
	* pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
	* sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
	to lll_{,un}lock macros on __sem_mappings_lock.
	* sem_open.c (check_add_mapping): Likewise.
	(__sem_mappings_lock): Change type to int.
	* semaphoreP.h (__sem_mappings_lock): Likewise.
	* pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
	LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
	instead of lll_*mutex_*, pass LLL_SHARED as last
	argument.
	(__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
	pass LLL_SHARED as last argument.
	* sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
	LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
	lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
	pass LLL_SHARED as last argument.
	* pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
	lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
	LLL_SHARED as last argument.
	* pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
	* pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
	Similarly.
	* sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
	__libc_lock_lock_recursive, __libc_lock_unlock,
	__libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
	argument to lll_{,un}lock.
	* sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
	_IO_lock_unlock): Likewise.
	* sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
	compound literal.
	* sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
	Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
	__fork_lock.
	* sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
	free_mem): Likewise.
	(__fork_lock): Change type to int.
	* sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
	* sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
	isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
	lll_futex_wake.
	* sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
	* sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
	* sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
	New function.
	(__lll_lock_wait, __lll_timedlock_wait): Add private argument and
	pass it through to lll_futex_*wait, only compile in when
	IS_IN_libpthread.
	* sysdeps/unix/sysv/linux/lowlevelrobustlock.c
	(__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
	argument and pass it through to lll_futex_*wait.
	* sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
	lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
	lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
	inline functions to __lll_* resp. __lll_robust_*.
	(LLL_MUTEX_LOCK_INITIALIZER): Remove.
	(lll_mutex_dead): Add private argument.
	(__lll_lock_wait_private): New prototype.
	(__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
	__lll_robust_lock_timedwait): Add private argument to prototypes.
	(__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
	call __lll_lock_wait_private, otherwise pass private to
	__lll_lock_wait.
	(__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
	__lll_robust_timedlock): Add private argument, pass it to
	__lll_*wait functions.
	(__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
	call __lll_unlock_wake_private, otherwise pass private to
	__lll_unlock_wake.
	(__lll_robust_unlock): Add private argument, pass it to
	__lll_robust_unlock_wake.
	(lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
	lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
	argument, pass it through to __lll_* inline function.
	(__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
	(lll_lock_t): Remove.
	(__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
	__lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
	lll_cond_wake, lll_cond_broadcast): Remove.
	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
	the header from assembler.  Renamed all lll_mutex_* resp.
	lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
	(LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
	FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
	(LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
	LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
	(__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
	__lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
	Remove prototype.
	(__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
	(lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
	rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
	(lll_trylock): Likewise, use __lll_trylock_asm, pass
	MULTIPLE_THREADS_OFFSET as another asm operand.
	(lll_lock): Add private argument, use __lll_lock_asm_start, pass
	MULTIPLE_THREADS_OFFSET as last asm operand, call
	__lll_lock_wait_private if private is constant LLL_PRIVATE,
	otherwise pass private as another argument to __lll_lock_wait.
	(lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
	lll_timedlock, lll_robust_timedlock): Add private argument, pass
	private as another argument to __lll_*lock_wait call.
	(lll_unlock): Add private argument, use __lll_unlock_asm, pass
	MULTIPLE_THREADS_OFFSET as another asm operand, call
	__lll_unlock_wake_private if private is constant LLL_PRIVATE,
	otherwise pass private as another argument to __lll_unlock_wake.
	(lll_robust_unlock): Add private argument, pass private as another
	argument to __lll_unlock_wake.
	(lll_robust_dead): Add private argument, use __lll_private_flag
	macro.
	(lll_islocked): Use LLL_LOCK_INITIALIZER instead of
	LLL_MUTEX_LOCK_INITIALIZER.
	(lll_lock_t): Remove.
	(LLL_LOCK_INITIALIZER_WAITERS): Define.
	(__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
	__lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
	lll_cond_wake, lll_cond_broadcast): Remove.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
	2007-05-2{3,9} changes.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
	kernel-features.h and lowlevellock.h.
	(LOAD_PRIVATE_FUTEX_WAIT): Define.
	(LOAD_FUTEX_WAIT): Rewritten.
	(LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
	define.
	(__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
	(__lll_mutex_lock_wait): Rename to ...
	(__lll_lock_wait): ... this.  Take futex addr from %edx instead of
	%ecx, %ecx is now private argument.  Don't compile in for libc.so.
	(__lll_mutex_timedlock_wait): Rename to ...
	(__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
	contains private argument.  Don't compile in for libc.so.
	(__lll_mutex_unlock_wake): Rename to ...
	(__lll_unlock_wake): ... this.  %ecx contains private argument.
	Don't compile in for libc.so.
	(__lll_timedwait_tid): Use __NR_gettimeofday.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
	kernel-features.h and lowlevellock.h.
	(LOAD_FUTEX_WAIT): Define.
	(LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
	define.
	(__lll_robust_mutex_lock_wait): Rename to ...
	(__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
	argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
	macro.
	(__lll_robust_mutex_timedlock_wait): Rename to ...
	(__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
	%esi argument contains private, use LOAD_FUTEX_WAIT macro.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
	lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
	(pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
	PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
	__lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
	to __lll_lock_wait in %edx.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
	Include lowlevellock.h and pthread-errnos.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
	FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
	(__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
	cond_lock address in %edx rather than %ecx to __lll_lock_wait,
	pass LLL_SHARED in %ecx to both __lll_lock_wait and
	__lll_unlock_wake.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
	Include lowlevellock.h and pthread-errnos.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
	FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
	(__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
	cond_lock address in %edx rather than %ecx to __lll_lock_wait,
	pass LLL_SHARED in %ecx to both __lll_lock_wait and
	__lll_unlock_wake.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
	Include lowlevellock.h.
	(SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
	Don't define.
	(__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
	cond_lock address in %edx rather than %ecx to __lll_lock_wait,
	pass LLL_SHARED in %ecx to both __lll_lock_wait and
	__lll_unlock_wake.  Use __NR_gettimeofday.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
	(__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
	to __lll_*, pass cond_lock address in %edx rather than %ecx to
	__lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
	and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
	(__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
	MUTEX(%ebx) address in %edx rather than %ecx to
	__lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
	and __lll_unlock_wake.  Move return value from %ecx to %edx
	register.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
	Include lowlevellock.h.
	(SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
	Don't define.
	(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
	MUTEX(%ebp) address in %edx rather than %ecx to
	__lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
	and __lll_unlock_wake.  Move return value from %ecx to %edx
	register.  Use __NR_gettimeofday.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
	Include lowlevellock.h.
	(SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
	Don't define.
	(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
	MUTEX(%ebp) address in %edx rather than %ecx to
	__lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
	and __lll_unlock_wake.  Move return value from %ecx to %edx
	register.  Use __NR_gettimeofday.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
	(__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
	MUTEX(%edi) address in %edx rather than %ecx to
	__lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
	and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
	(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
	MUTEX(%ebx) address in %edx rather than %ecx to
	__lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
	and __lll_unlock_wake.  Move return value from %ecx to %edx
	register.
	* sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
	lowlevellock.h.
	(LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
	define.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
	(LOCK, SYS_futex, FUTEX_WAKE): Don't define.
	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
	lowlevellock.h.
	(LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
	(sem_timedwait): Use __NR_gettimeofday.
	* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
	lowlevellock.h.
	(LOCK): Don't define.
	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
	lowlevellock.h.
	(LOCK, SYS_futex, FUTEX_WAIT): Don't define.
	* sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
	are waiters.
	* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
	2007-05-2{3,9} changes.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
	kernel-features.h and lowlevellock.h.
	(LOAD_PRIVATE_FUTEX_WAIT): Define.
	(LOAD_FUTEX_WAIT): Rewritten.
	(LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
	(__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
	(__lll_mutex_lock_wait): Rename to ...
	(__lll_lock_wait): ... this.  %esi is now private argument.
	Don't compile in for libc.so.
	(__lll_mutex_timedlock_wait): Rename to ...
	(__lll_timedlock_wait): ... this.  %esi contains private argument.
	Don't compile in for libc.so.
	(__lll_mutex_unlock_wake): Rename to ...
	(__lll_unlock_wake): ... this.  %esi contains private argument.
	Don't compile in for libc.so.
	* sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
	kernel-features.h and lowlevellock.h.
	(LOAD_FUTEX_WAIT): Define.
	(LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
	(__lll_robust_mutex_lock_wait): Rename to ...
	(__lll_robust_lock_wait): ... this.  %esi argument contains private.
	Use LOAD_FUTEX_WAIT macro.
	(__lll_robust_mutex_timedlock_wait): Rename to ...
	(__lll_robust_timedlock_wait): ... this. %esi argument contains
	private, use LOAD_FUTEX_WAIT macro.
	* sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
	lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
	(pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
	PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
	__lll_lock_wait and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
	Include lowlevellock.h and pthread-errnos.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
	FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
	(__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
	pass LLL_SHARED in %esi to both __lll_lock_wait and
	__lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
	Include lowlevellock.h and pthread-errnos.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
	FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
	(__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
	pass LLL_SHARED in %esi to both __lll_lock_wait and
	__lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
	(__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
	pass LLL_SHARED in %esi to both __lll_lock_wait and
	__lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
	(__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
	to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
	and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
	Don't define.
	(__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
	pass PSHARED(%rdi) in %esi to both __lll_lock_wait
	and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
	Don't define.
	(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
	pass PSHARED(%rdi) in %esi to both __lll_lock_wait
	and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
	Don't define.
	(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
	pass PSHARED(%rdi) in %esi to both __lll_lock_wait
	and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
	Don't define.
	(__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
	pass PSHARED(%rdi) in %esi to both __lll_lock_wait
	and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
	Include lowlevellock.h.
	(SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
	Don't define.
	(__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
	pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
	and __lll_unlock_wake.
	* sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
	lowlevellock.h.
	(LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
	define.
	* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
	(LOCK, SYS_futex, FUTEX_WAKE): Don't define.
	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
	lowlevellock.h.
	(LOCK, SYS_futex, FUTEX_WAIT): Don't define.
	* sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
	lowlevellock.h.
	(LOCK): Don't define.
	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
	lowlevellock.h.
	(LOCK, SYS_futex, FUTEX_WAIT): Don't define.
	* sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
	* sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
	* sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
	* sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
	(__lll_lock_wait_private): New function.
	(__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
	it to lll_futex_*wait.  Don't compile in for libc.so.
	* sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
	Remove.
	* sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
	(struct sparc_pthread_barrier): Remove.
	(pthread_barrier_wait): Use union sparc_pthread_barrier instead of
	struct sparc_pthread_barrier.  Pass
	ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
	and lll_futex_wait macros.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
	Remove.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
	Include sparc pthread_barrier_wait.c instead of generic one.
2007-08-01 04:47:26 +00:00
Ulrich Drepper 1475e2012f * stdlib/tst-strtod2.c (do_test): Use %tu in fmt string for ptrdiff_t
value.

	* stdio-common/tst-fmemopen2.c (do_test): Avoid fmt string warning
	if off_t is different rank from size_t.

	* sysdeps/generic/unwind-dw2.c (extract_cie_info, execute_cfa_program,
	uw_frame_state_for): Avoid type punning warnings.
	* sysdeps/generic/unwind-dw2-fde-glibc.c
	(_Unwind_IteratePhdrCallback): Likewise.
	* sysdeps/generic/unwind-dw2-fde.c (_Unwind_Find_FDE): Likewise.
	(binary_search_single_encoding_fdes, binary_search_mixed_encoding_fdes,
	get_cie_encoding, linear_search_fdes): Don't mix char and unsigned char
	pointers.
2007-08-01 03:44:35 +00:00
Ulrich Drepper 6f59d56e61 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
(pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
	%ecx.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
	(pthread_rwlock_timedwrlock): Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
	(__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2007-08-01 03:41:01 +00:00
Jakub Jelinek 558f030079 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2007-07-31  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2007-07-31 19:36:40 +00:00
Ulrich Drepper cedb410957 * locale/programs/ld-monetary.c (monetary_finish): Avoid range check
for int_frac_digits and frac_digits.

	* login/logout.c (logout): Avoid aliasing violation.
	* login/logwtmp.c (logwtmp): Likewise.

	* libio/genops.c (_IO_un_link): Avoid aliasing violation.
2007-07-28 20:45:36 +00:00
Ulrich Drepper 085a441220 * iconvdata/gbk.c (BODY): Make buf and cp char instead of unsigned
char array resp. pointer.
	* iconvdata/iso-2022-kr.c (BODY): Make buf unsigned char instead of
	char array.
	* iconvdata/cns11643.h (cns11643_to_ucs4): Change first argument
	to const unsigned char **.
	(ucs4_to_cns11643): Change second argument to unsigned char *.
	* iconvdata/euc-tw.c (BODY): Change endp type to
	const unsigned char *.
	* iconvdata/iso-ir-165.h (ucs4_to_isoir165): Change second argument
	to unsigned char *.
	* iconvdata/ibm1008_420.c (LOOP_NEED_FLAGS): Don't define.
	* iconvdata/iso-2022-cn.c (BODY): Change buf to unsigned char array.
	* iconvdata/iso-2022-cn-ext.c (BODY): Change buf, tmpbuf, tmp
	types to unsigned char pointers/arrays instead of char.
	* iconvdata/jis0201.h (ucs4_to_jisx0201): Change second argument
	to unsigned char *.
	* iconvdata/jis0208.h (ucs4_to_jisx0208): Likewise.
	* iconvdata/jis0212.h: Include assert.h.
	(ucs4_to_jisx0212): Change second argument to unsigned char *.
	assert that if cp[0] is not '\0', cp[1] is not '\0' either instead
	of trying to handle that.
	* iconvdata/euc-kr.c (euckr_from_ucs4): Initialize also cp[1] to
	shut up a warning.
	* iconvdata/euc-jp-ms.c (from_ucs4_lat1, from_ucs4_greek,
	from_ucs4_cjk, from_ucs4_cjkcpt, from_ucs4_extra): Change type to
	two dimensional const unsigned char arrays.
	(BODY): Cast "" to (const unsigned char *) for assignment to cp.
	Initialize endp to inptr to shut up a warning.
2007-07-28 20:16:07 +00:00
Jakub Jelinek ef0af159c5 2007-07-27 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
	of the structure for sparc32.

2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>

	* sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2007-07-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
	of the structure for sparc32.

2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>

	* sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2007-07-27 22:07:39 +00:00
Ulrich Drepper eb4f590989 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
code used when private futexes are assumed.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
	Likewise.
2007-07-24 06:57:42 +00:00
Ulrich Drepper b5f13526e2 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
(__lll_private_flag): Define.
	(lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
	(lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
	__lll_private_flag.
	(lll_private_futex_wait, lll_private_futex_timedwait,
	lll_private_futex_wake): Define as wrapper around non-_private
	macros.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
	(__lll_private_flag): Define.
	(lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
	(lll_private_futex_wait, lll_private_futex_timedwait,
	lll_private_futex_wake): Define as wrapper around non-_private
	macros.
2007-07-24 06:43:01 +00:00
Ulrich Drepper eb7721f232 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
parameter to lll_futex_wait call.
	* pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.

	* sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
	Replace lll_futex_wait with lll_private_futex_wait.
	* sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
	Add LLL_SHARED parameter to lll_futex_wake().

	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
	LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
	lll_private_futex_wake.
	(lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
	bit from private parm before syscall.
	(lll_futex_timed_wait): Likewise.
	(lll_futex_wake): Likewise.
	(lll_futex_wake_unlock): Likewise.
	(lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
	(lll_robust_mutex_unlock): Likewise.
	(lll_mutex_unlock_force): Likewise.
	(lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2007-07-23 16:07:53 +00:00
Ulrich Drepper defc45f2fa * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
compilation when unconditionally using private futexes.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2007-07-23 15:46:31 +00:00
Ulrich Drepper 087722b854 * include/features.h (__USE_ISOC95): New define.
* wcsmbs/wchar.h (fwprintf, fwscanf, wprintf, wscanf, swprintf,
	swscanf, vfwprintf, vwprintf, vswprintf, fwide): Define even
	for -std=iso9899:199409.
	* CONFORMANCE: Remove comments about unsupported AMD1.
2007-07-19 17:28:06 +00:00
Ulrich Drepper 765c6b0c46 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
kernel-features.h.
2007-07-07 01:54:07 +00:00
Roland McGrath 7d9d8bd189 * init.c (__nptl_initial_report_events): New variable.
(__pthread_initialize_minimal_internal): Initialize pd->report_events
	to that.
2007-06-26 06:47:56 +00:00
Ulrich Drepper a4915df27a * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2007-06-22 22:13:38 +00:00
Ulrich Drepper e4eb675d0c * elf/dl-close.c (free_mem): Free _dl_scope_free_list.
2007-06-13  Jakub Jelinek  <jakub@redhat.com>

	* include/link.h: Don't include rtld-lowlevel.h.
	(struct link_map): Remove l_scope_lock.
	* sysdeps/generic/ldsodefs.h: Don't include rtld-lowlevel.h.
	(_dl_scope_free_list): New field (variable) in _rtld_global.
	(DL_LOOKUP_SCOPE_LOCK): Remove.
	(_dl_scope_free): New prototype.
	* elf/dl-runtime.c (_dl_fixup): Don't use __rtld_mrlock_*lock.
	Don't pass DL_LOOKUP_SCOPE_LOCK to _dl_lookup_symbol_x.
	(_dl_profile_fixup): Likewise.
	* elf/dl-sym.c (do_sym): Likewise.  Use wrapped _dl_lookup_symbol_x
	whenever !RTLD_SINGLE_THREAD_P, use THREAD_GSCOPE_SET_FLAG and
	THREAD_GSCOPE_RESET_FLAG around it.
	* elf/dl-close.c (_dl_close_worker): Don't use
	__rtld_mrlock_{change,done}.  Call _dl_scope_free on the old
	scope.  Make sure THREAD_GSCOPE_WAIT () happens if any old
	scopes were queued or if l_scope_mem has been abandoned.
	* elf/dl-open.c (_dl_scope_free): New function.
	(dl_open_worker): Use it.  Don't use __rtld_mrlock_{change,done}.
	* elf/dl-support.c (_dl_scope_free_list): New variable.
	* elf/dl-lookup.c (add_dependency): Remove flags argument.
	Remove DL_LOOKUP_SCOPE_LOCK handling.
	(_dl_lookup_symbol_x): Adjust caller.  Remove DL_LOOKUP_SCOPE_LOCK
	handling.
	* elf/dl-object.c (_dl_new_object): Don't use
	__rtld_mrlock_initialize.

2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2007-06-20 03:19:13 +00:00
Ulrich Drepper ae1ad3aebb [BZ #4647]
Tomas Janousek  <tjanouse@redhat.com>
            Ulrich Drepper  <drepper@redhat.com>

	[BZ #4647]
	* resolv/res_send.c (send_dg): Remove socket_pf.  Use ipv6_unavail
	member in __res_state, only convaddr4to6 if nssocks[ns] is a PF_INET6
	socket.
	* resolv/resolv.h (__res_state): Add ipv6_unavail member.  Make
	unused member a bitmap.
	* resolv/res_init.c (__res_vinit): Reset ipv6_unavail if IPv6
	servers are configured.

2007-06-18  Jakub Jelinek  <jakub@redhat.com>
2007-06-18 22:22:57 +00:00
Ulrich Drepper 8907459218 * sysdeps/generic/initfini.c: Tell gcc about the nonstandard sections.
PTRACE_O_TRACEVFORKDONE, PTRACE_O_TRACEEXIT, PTRACE_O_MASK,
2007-06-17 18:03:08 +00:00
Ulrich Drepper d4201cc4ba * allocatestack.c (allocate_stack): Make code compile if
__ASSUME_PRIVATE_FUTEX is set.
2007-06-17 16:43:57 +00:00
Ulrich Drepper 339dbf0e39 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
(__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
	(__pthread_rwlock_wrlock): Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
	(pthread_rwlock_timedrdlock): Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
	(pthread_rwlock_timedwrlock): Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
	(__pthread_rwlock_unlock): Likewise.

2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
	* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
	Split __flags into __flags, __shared, __pad1 and __pad2.
	* sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
        futexes if they are available.
	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
        in libc-lowlevellock.S allow using private futexes.
	* sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
	FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
	lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
	to call lll_futex_timed_wait.  Add lll_private_futex_wait,
	lll_private_futex_timed_wait and lll_private_futex_wake.
	(lll_robust_mutex_unlock): Fix typo.
	* sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
        field in futex command setup.
	* sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
	COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
	* sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
        if they are available.  Remove clear_once_control.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
	futexes if they are available.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
	Wake only when there are waiters.
	* sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
	support.  Indicate that there are waiters.  Remove unnecessary
        extra cancellation test.
	* sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
	left-over duplication of __sem_wait_cleanup.
2007-06-17 16:42:55 +00:00
Ulrich Drepper 26f56c1c0e * configure.in: Avoid variable named BASH.
Patch in part by Mike Frysinger.
2007-06-06  Jakub Jelinek  <jakub@redhat.com>
2007-06-08 03:17:15 +00:00
Ulrich Drepper b03b0c2920 * pthread_getattr_np.c: No need to install a cancellation handler,
this is no cancellation point.
	* pthread_getschedparam.c: Likewise.
	* pthread_setschedparam.c: Likewise.
	* pthread_setschedprio.c: Likewise.
	* sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
	lll_unlock_wake_cb.
	* sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2007-05-30 04:45:03 +00:00
Ulrich Drepper fc3f0ccb98 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
(__lll_mutex_unlock_wake): Add back label '1' which went AWOL quite
	some time ago.
2007-05-30 04:22:24 +00:00
Ulrich Drepper 0154658d3d * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
whether there are more than one thread makes no sense here since
	we only call the slow path if the locks are taken.
	* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2007-05-30 04:08:13 +00:00
Ulrich Drepper ee5d5755a8 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
COND_NWAITERS_SHIFT.
	* pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
	COND_CLOCK_BITS.
	* pthread_cond_init.c: Likewise.
	* pthread_cond_timedwait.c: Likewise.
	* pthread_cond_wait.c: Likewise.
	* pthread_condattr_getclock.c: Likewise.
	* pthread_condattr_setclock.c: Likewise.
	* sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2007-05-29 16:15:48 +00:00
Ulrich Drepper 40f57573d0 * sysdeps/unix/sysv/linux/futimes.c (miss_utimensat): Don't define
if __NR_utimensat is not defined.
2007-05-28 16:43:59 +00:00
Ulrich Drepper 991fa82be5 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
insn suffix.
	(THREAD_GSCOPE_GET_FLAG): Remove.
	* sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
	* allocatestack.c (__wait_lookup_done): Revert 2007-05-24
	changes.
	* sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
	(THREAD_GSCOPE_GET_FLAG): Remove.
	(THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
	instead of THREAD_GSCOPE_GET_FLAG.
	(THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
	it.
	* sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.
	* sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.
	* sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.
	* sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.

2007-05-24  Richard Henderson  <rth@redhat.com>

	* descr.h (struct pthread): Add header.gscope_flag.
	* sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.
2007-05-28 16:42:08 +00:00
Ulrich Drepper cd0dbd8944 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to 2007-05-27 18:56:40 +00:00
Ulrich Drepper 50f1dec5d3 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2007-05-27 18:56:02 +00:00
Ulrich Drepper e59660bc25 * init.c: Make it compile with older kernel headers.
* tst-initializers1.c: Show through exit code which test failed.

	* pthread_rwlock_init.c: Also initialize __shared field.
	* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
	element in rwlock structure into four byte elements.  One of them is
	the new __shared element.
	* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
	Likewise.
	[__WORDSIZE=64]: Renamed __pad1 element int rwlock structire to
	__shared, adjust names of other padding elements.
	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
	* sysdeps/pthread/pthread.h: Adjust rwlock initializers.
	* sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
	FUTEX_PRIVATE_FLAG.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
	futex to use private operations if possible.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2007-05-27 18:06:18 +00:00
Ulrich Drepper 546346b6f8 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
* pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
	* pthread_rwlock_timedrdlock.c: Likewise.
	* pthread_rwlock_tryrdlock.c: Likewise.
2007-05-26 22:11:42 +00:00
Ulrich Drepper a2dd3360db * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
optimization.
2007-05-26 21:47:28 +00:00
Ulrich Drepper 6df7ffad19 * sysdeps/unix/sysv/linux/powerpc/libc-start.c: Include <sysdep.h>. 2007-05-26 20:13:27 +00:00
Ulrich Drepper d8ff3792a8 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
Add private field.
	* sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
	* pthread_barrier_init.c: Set private flag if pshared and private
	futexes are supported.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
	private field in futex command setup.
	* sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2007-05-26 16:19:15 +00:00
Ulrich Drepper 42e6c66593 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
support.
	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2007-05-26 04:49:06 +00:00
Ulrich Drepper 3d2dd6ca71 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
* sem_init.c (__new_sem_init): Rewrite to initialize all three
	fields in the structure.
	(__old_sem_init): New function.
	* sem_open.c: Initialize all fields of the structure.
	* sem_getvalue.c: Adjust for renamed element.
	* sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
	(gen-as-const-headers): Add structsem.sym.
	* sysdeps/unix/sysv/linux/structsem.sym: New file.
	* sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
	struct new_sem.  Add struct old_sem.
	* sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
	* sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
	* Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
	* tst-sem10.c: New file.
	* tst-sem11.c: New file.
	* tst-sem12.c: New file.
	* tst-typesizes.c: Test struct new_sem and struct old_sem instead
	of struct sem.

2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2007-05-26 01:31:40 +00:00
Jakub Jelinek 20a4d7228e * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
Move __pthread_enable_asynccancel right before futex syscall. 
* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): 
Likewise.
2007-05-25  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
	Move __pthread_enable_asynccancel right before futex syscall.
	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
	Likewise.

2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2007-05-25 19:27:03 +00:00
Ulrich Drepper 86acd59634 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
THREAD_COPY_PRIVATE_FUTEX): Define.
	* sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
	THREAD_COPY_PRIVATE_FUTEX): Define.
	* allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
	* init.c (__pthread_initialize_minimal_internal): Use
	THREAD_SET_PRIVATE_FUTEX.
2007-05-25 05:24:16 +00:00
Ulrich Drepper 0a54ab53f2 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
(THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
	THREAD_GSCOPE_FLAG_WAIT): Define.
	(THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
	* sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
	PTR_DEMANGLE.
	(THREAD_GSCOPE_GET_FLAG): Define.
	* sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
	* allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
	instead of ->header.gscope_flag directly.
2007-05-25 05:21:07 +00:00
Ulrich Drepper 5a8075b116 * init.c (__pthread_initialize_minimal_internal): Check whether
private futexes are available.
	* allocatestack.c (allocate_stack): Copy private_futex field from
	current thread into the new stack.
	* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
	futexes if they are available.
	* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
	in libc-lowlevellock.S allow using private futexes.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
	FUTEX_PRIVATE_FLAG.
	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
	if they are available.
	* sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
	* sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
	* sysdeps/i386/tcb-offsets.sym: Likewise.
	* sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
	* sysdeps/i386/tls.h (tcbhead_t): Likewise.
2007-05-23 20:51:45 +00:00
Ulrich Drepper 6d59823c29 * sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Pass correct value
as second parameter to handle_intel.
2007-05-21 22:38:06 +00:00
Jakub Jelinek 2c9718f3b3 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
pthread_mutex_init failed with ENOTSUP.
2007-05-21  Jakub Jelinek  <jakub@redhat.com>

	* tst-robust9.c (do_test): Don't fail if ENABLE_PI and
	pthread_mutex_init failed with ENOTSUP.
2007-05-21 22:12:40 +00:00
Ulrich Drepper df94b6412e * elf/dl-close.c (_dl_close_worker): When removing object from
global scope, wait for all lookups to finish afterwards.
	* elf/dl-open.c (add_to_global): When global scope array must
	grow, allocate a new one and free old array only after all
	lookups finish.
	* elf/dl-runtime.c (_dl_fixup): Protect using global scope.
	(_dl_lookup_symbol_x): Likewise.
	* elf/dl-support.c: Define _dl_wait_lookup_done.
	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add
	_dl_wait_lookup_done.
2007-05-19 07:08:23 +00:00
Ulrich Drepper 113ad5fc91 [BZ #4512]
* pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
	is detected.
	* pthread_mutex_timedlock.c: Likewise.
	* pthread_mutex_trylock.c: Likewise.
	Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.

	* Makefile (tests): Add tst-robust9 and tst-robustpi9.
	* tst-robust9.c: New file.
	* tst-robustpi9.c: New file.
2007-05-18 00:55:10 +00:00
Ulrich Drepper bec51a302f Dummy files to prevent stub versions from being used.
* sysdeps/x86_64/fpu/k_cosl.c: New file.
	* sysdeps/x86_64/fpu/k_rem_pio2l.c: New file.
	* sysdeps/x86_64/fpu/k_sinl.c: New file.
	* sysdeps/x86_64/fpu/k_tanl.c: New file.
2007-05-17 18:39:55 +00:00
Ulrich Drepper 2c1d617226 * version.h (VERSION): Define to 6.
* include/features.h (__GLIBC_MINOR__): Likewise.
2007-05-15 06:49:29 +00:00
Ulrich Drepper 83d87915da * sysdeps/unix/sysv/linux/sem_post.c: Only wake threads if old
value of semaphore was zero.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/sem_post.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.

	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
	extra cancellation test.
	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2007-05-15 06:24:31 +00:00
Ulrich Drepper 341c566f05 * sysdeps/unix/sysv/linux/tst-getcpu.c: New file.
* sysdeps/unix/sysv/linux/Makefile [subdir=posix] (tests): Add
	tst-getcpu.

	* include/link.h: Move l_version and l_nversion members around to
	fill gaps.
2007-05-11 06:39:07 +00:00
Ulrich Drepper 3771196d1d * sysdeps/unix/sysv/linux/sched_setaffinity.c
(__sched_setaffinity_new): If syscall was successful and
	RESET_VGETCPU_CACHE is defined, use it before returning.
	* sysdeps/unix/sysv/linux/x86_64/sched_setaffinity.c: New file.
2007-05-10 23:38:55 +00:00
Jakub Jelinek 7d29b542a8 [BZ #4455]
* tst-align2.c: Include stackinfo.h. 
* tst-getpid1.c: Likewise.
2007-05-10  Jakub Jelinek  <jakub@redhat.com>

	[BZ #4455]
	* tst-align2.c: Include stackinfo.h.
	* tst-getpid1.c: Likewise.
2007-05-10 15:17:55 +00:00
Ulrich Drepper 29c113f0db [BZ #4455]
* tst-align2.c (do_test): Add _STACK_GROWS_UP case.
	* tst-getpid1.c (do_test): Likewise.
2007-05-07 22:15:16 +00:00
Ulrich Drepper 16105fe0bc [BZ #4456]
2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
	[BZ #4456]
	* allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
	(allocate_stack): Likewise.
2007-05-07 22:03:32 +00:00
Ulrich Drepper 6780bc44e8 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
(__lll_robust_lock_wait): Fix race caused by reloading of futex value.
	(__lll_robust_timedlock_wait): Likewise.
	Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2007-05-07 14:26:13 +00:00
Ulrich Drepper 15eca72044 [BZ #4465]
[BZ #4465]
2007-05-07 04:24:57 +00:00
Ulrich Drepper aa75f64c62 * posix/unistd.h: Remove __THROW from fdatasync. 2007-05-07 04:23:14 +00:00
Ulrich Drepper 1bb5f5a1c5 [BZ #4392]
* pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
	check mutexes like normal mutexes.
2007-04-28 04:23:56 +00:00
Ulrich Drepper f672076efa [BZ #4306]
2007-04-27  Ulrich Drepper  <drepper@redhat.com>
	[BZ #4306]
	* sysdeps/unix/sysv/linux/timer_create.c (timer_create):
	Initialize the whole sigevent structure to appease valgrind.
2007-04-28 04:03:38 +00:00
Ulrich Drepper bce20b9a86 * sysdeps/unix/sysv/linux/Makefile [subdir=posix] (sysdep_routines):
Add sched_getcpu.
2007-04-26 04:59:42 +00:00
Ulrich Drepper 0c786eacd3 * tst-locale1.c: Avoid warnings.
* tst-locale2.c: Likewise.
2007-04-06 22:19:54 +00:00
Ulrich Drepper e1f0c5bc78 * scripts/check-local-headers.sh: Filter out sys/capability.h.
2007-03-22  Jakub Jelinek  <jakub@redhat.com>

	* config.h.in (HAVE_LIBCAP): Add.
	* nscd/selinux.h: Include sys/capability.h rather than non-existent
	sys/capabilities.h.
	* nscd/selinux.c (preserve_capabilities): Use cap_free instead of
	free_caps.  Cast away const from 4th cap_set_flag argument.
2007-03-26 20:41:09 +00:00
Ulrich Drepper 965cba048c * elf/dl-open.c (dl_open_worker): Declare l in 2 different
smaller scopes.
	* elf/dl-dst.h (DL_DST_REQ_STATIC): Add l as macro argument.
	(DL_DST_REQUIRED): Adjust user.

	* include/dlfcn.h (struct link_map): New forward decl.

	* inet/getnameinfo.c: Include stddef.h.
	(getnameinfo): Use offsetof.

	* time/tst-mktime2.c (do_test): Don't rely on signed wrap.

	* stdio-common/vfprintf.c (_itoa): Undef before redefining.

	* string/strerror_l.c: Include stdlib.h.
2007-03-17 17:09:13 +00:00
Richard Henderson a5ea509b61 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
separate cfi regions for the two subsections.
2007-03-13  Richard Henderson  <rth@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
	separate cfi regions for the two subsections.
2007-03-13 21:28:03 +00:00
Ulrich Drepper 00a1430e3f * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
new thread, don't just decrement it.
	Patch by Suzuki K P <suzuki@in.ibm.com>.
2007-02-25 21:44:22 +00:00
Ulrich Drepper 63a2f30529 [BZ #4076]
* io/ftw.c (ftw_startup): Handle special case of FTW_CHDIR in /.
	(open_dir_stream): Likewise.
	* io/Makefile (tests): Add bug-ftw5.
	io/bug-ftw5.c: New file.
2007-02-21 09:36:46 +00:00
Ulrich Drepper 2484468be1 [BZ #3325]
* sysdeps/i386/fpu/e_fmodf.S: Use fprem1 instead of fprem.
	* sysdeps/i386/fpu/e_fmodl.c: Likewise.
	* sysdeps/i386/fpu/e_fmod.S: Likewise.
	Patch by Jared Casper <jaredcasper@gmail.com>.
2007-02-19 05:48:54 +00:00
Ulrich Drepper 5ed61e0fd6 * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Remove incorrect comment. 2007-02-10 00:10:39 +00:00
Ulrich Drepper f8a1785592 * tst-initializers1.c: We want to test the initializers as seen
outside of libc, so undefined _LIBC.
2007-01-19 06:58:04 +00:00
Ulrich Drepper 10ccaa5cae * pthread_join.c (cleanup): Avoid warning. 2007-01-18 22:19:48 +00:00
Ulrich Drepper 1476bce6ff * sysdeps/unix/sysv/linux/fatal-prepare.h: Use PTHFCT_CALL to
demangle pointer.
	* csu/libc-start.c: Likewise.
2007-01-17 09:33:32 +00:00
Ulrich Drepper ea1533e08d * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
function table, mangle the pointers.
	* sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
	* forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
	* sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
	demangle pointers before use.
	* sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
	demangle pointer.
	* sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
	* sysdeps/pthread/setxid.h: Likewise.
2007-01-17 08:37:26 +00:00
Ulrich Drepper 8980796b15 [BZ #3840]
2007-01-12  Ulrich Drepper  <drepper@redhat.com>
	[BZ #3840]
	* scripts/check-local-headers.sh: Restrict to testing .o.d, .os.d,
	and .oS.d files.
2007-01-12 17:02:22 +00:00