Commit Graph

1134 Commits

Author SHA1 Message Date
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