Commit Graph

31 Commits

Author SHA1 Message Date
Ulrich Drepper 35f1e82763 * Versions.def (ld): Add GLIBC_2.4.
* configure.in: Add --enable-stackguard-randomization option.
	(ENABLE_STACKGUARD_RANDOMIZE): New define.
	* config.h.in (ENABLE_STACKGUARD_RANDOMIZE): Add.
	* sysdeps/unix/sysv/linux/dl-osinfo.h: Include stdint.h.
	(_dl_setup_stack_chk_guard): New inline function.
	* sysdeps/generic/dl-osinfo.h: Include stdint.h.
	(_dl_setup_stack_chk_guard): New inline function.
	* elf/rtld.c (__stack_chk_guard): New variable.
	(dl_main): Remove all traces of TLS_INIT_TP_EXPENSIVE.
	Set __stack_chk_guard to _dl_setup_stack_chk_guard (),
	use THREAD_SET_STACK_GUARD if defined.
	* elf/Versions (ld): Export __stack_chk_guard@@GLIBC_2.4.
	* sysdeps/generic/libc-start.c (__stack_chk_guard): New variable.
	(__libc_start_main): Set __stack_chk_guard to
	_dl_setup_stack_chk_guard (), use THREAD_SET_STACK_GUARD if defined.
	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Remove all
	traces of TLS_INIT_TP_EXPENSIVE.
	* debug/Versions (libc): Export __stack_chk_fail@@GLIBC_2.4.
	* debug/Makefile (routines): Add stack_chk_fail.
	(static-only-routines): Add stack_chk_fail_local.
	* debug/stack_chk_fail_local.c: New file.
	* debug/stack_chk_fail.c: New file.
	* elf/Makefile: Add rules to build and run tst-stackguard1{,-static}
	tests.
	* elf/tst-stackguard1.c: New file.
	* elf/tst-stackguard1-static.c: New file.
	* elf/stackguard-macros.h: New file.
2005-06-26 18:14:26 +00:00
Ulrich Drepper f7d78e18aa * sysdeps/powerpc/powerpc32/fpu/s_ceil.S (TWO52.0): Delete.
* sysdeps/powerpc/powerpc32/fpu/s_ceilf.S (TWO23.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_floor.S (TWO52.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_floorf.S (TWO23.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_lround.S: Comment typo.
	(NEGZERO.0, POINTFIVE.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_rint.S (TWO52.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_rintf.S (TWO23.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_round.S (__round): Code in .text.
	(TWO52.0, POINTFIVE.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_roundf.S (__roundf): Code in .text.
	(TWO23.0, POINTFIVE.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_trunc.S (__trunc): Code in .text.
	(TWO52.0): Delete.
	* sysdeps/powerpc/powerpc32/fpu/s_truncf.S (__truncf): Code in .text.
	(TWO23.0): Delete.
	* sysdeps/powerpc/powerpc32/memset.S (memset): Formatting.
2005-05-21 19:01:22 +00:00
Ulrich Drepper 8cf3e47119 Fix typo. 2005-04-26 16:11:10 +00:00
Ulrich Drepper 9dcafc5597 * csu/elf-init.c (__libc_csu_fini): Don't do anything here.
* sysdeps/generic/libc-start.c: Don't register program destructor here.
	* dlfcn/Makefile: Add rules to build dlfcn.c.
	(LDFLAGS-dl.so): Removed.
	* dlfcn/dlclose.c: _dl_close is now in ld.so, use function pointer
	table.
	* dlfcn/dlmopen.c: Likewise for _dl_open.
	* dlfcn/dlopen.c: Likewise.
	* dlfcn/dlopenold.c: Likewise.
	* elf/dl-libc.c: Likewise for _dl_open and _dl_close.
	* elf/Makefile (routines): Remove dl-open and dl-close.
	(dl-routines): Add dl-open, dl-close, and dl-trampoline.
	Add rules to build and run tst-audit1.
	* elf/tst-audit1.c: New file.
	* elf/tst-auditmod1.c: New file.
	* elf/Versions [libc]: Remove _dl_open and _dl_close.
	* elf/dl-close.c: Change for use inside ld.so instead of libc.so.
	* elf/dl-open.c: Likewise.
	* elf/dl-debug.c (_dl_debug_initialize): Allow reinitialization,
	signaled by nonzero parameter.
	* elf/dl-init.c: Fix use of r_state.
	* elf/dl-load.c: Likewise.

	* elf/dl-close.c: Add auditing checkpoints.
	* elf/dl-open.c: Likewise.
	* elf/dl-fini.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* sysdeps/generic/libc-start.c: Likewise.
	* elf/dl-object.c: Allocate memory for auditing information.
	* elf/dl-reloc.c: Remove RESOLV.  We now always need the map.
	Correctly initialize slotinfo.
	* elf/dynamic-link.h: Adjust after removal of RESOLV.
	* sysdeps/hppa/dl-lookupcfg.h: Likewise.
	* sysdeps/ia64/dl-lookupcfg.h: Likewise.
	* sysdeps/powerpc/powerpc64/dl-lookupcfg.h: Removed.
	* elf/dl-runtime.c (_dl_fixup): Little cleanup.
	(_dl_profile_fixup): New parameters to point to register struct and
	variable for frame size.
	Add auditing checkpoints.
	(_dl_call_pltexit): New function.
	Don't define trampoline code here.
	* elf/rtld.c: Recognize LD_AUDIT.  Load modules on startup.
	Remove all the functions from _rtld_global_ro which only _dl_open
	and _dl_close needed.
	Add auditing checkpoints.
	* elf/link.h: Define symbols for auditing interfaces.
	* include/link.h: Likewise.
	* include/dlfcn.h: Define __RTLD_AUDIT.
	Remove prototypes for _dl_open and _dl_close.
	Adjust access to argc and argv in libdl.
	* dlfcn/dlfcn.c: New file.
	* sysdeps/generic/dl-lookupcfg.h: Remove all content now that RESOLVE
	is gone.
	* sysdeps/generic/ldsodefs.h: Add definitions for auditing interfaces.
	* sysdeps/generic/unsecvars.h: Add LD_AUDIT.
	* sysdeps/i386/dl-machine.h: Remove trampoline code here.
	Adjust for removal of RESOLVE.
	* sysdeps/x86_64/dl-machine.h: Likewise.
	* sysdeps/generic/dl-trampoline.c: New file.
	* sysdeps/i386/dl-trampoline.c: New file.
	* sysdeps/x86_64/dl-trampoline.c: New file.

	* sysdeps/generic/dl-tls.c: Cleanups.  Fixup for dtv_t change.
	Fix updating of DTV.
	* sysdeps/generic/libc-tls.c: Likewise.

	* sysdeps/arm/bits/link.h: Renamed to ...
	* sysdeps/arm/buts/linkmap.h: ...this.
	* sysdeps/generic/bits/link.h: Renamed to...
	* sysdeps/generic/bits/linkmap.h: ...this.
	* sysdeps/hppa/bits/link.h: Renamed to...
	* sysdeps/hppa/bits/linkmap.h: ...this.
	* sysdeps/hppa/i386/link.h: Renamed to...
	* sysdeps/hppa/i386/linkmap.h: ...this.
	* sysdeps/hppa/ia64/link.h: Renamed to...
	* sysdeps/hppa/ia64/linkmap.h: ...this.
	* sysdeps/hppa/s390/link.h: Renamed to...
	* sysdeps/hppa/s390/linkmap.h: ...this.
	* sysdeps/hppa/sh/link.h: Renamed to...
	* sysdeps/hppa/sh/linkmap.h: ...this.
	* sysdeps/hppa/x86_64/link.h: Renamed to...
	* sysdeps/hppa/x86_64/linkmap.h: ...this.
2005-01-06  Ulrich Drepper  <drepper@redhat.com>

	* allocatestack.c (init_one_static_tls): Adjust initialization of DTV
	entry for static tls deallocation fix.
	* sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
	also contains information whether the memory pointed to is static
	TLS or not.
	* sysdeps/i386/tls.h: Likewise.
	* sysdeps/ia64/tls.h: Likewise.
	* sysdeps/powerpc/tls.h: Likewise.
	* sysdeps/s390/tls.h: Likewise.
	* sysdeps/sh/tls.h: Likewise.
	* sysdeps/sparc/tls.h: Likewise.
	* sysdeps/x86_64/tls.h: Likewise.
2005-01-06 22:40:27 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Ulrich Drepper 7d58530341 Test for stack alignment. 2004-12-22 20:09:42 +00:00
Ulrich Drepper afdca0f2a3 Update.
* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
	* sysdeps/s390/s390-32/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc32/dl-machine.c: Likewise.
	* sysdeps/m68k/dl-machine.h: Likewise.
	* sysdeps/ia64/dl-machine.h: Likewise.
	* sysdeps/arm/dl-machine.h: Likewise.
	* sysdeps/alpha/dl-machine.h: Likewise.
2004-03-05 10:29:47 +00:00
Ulrich Drepper c776b3d717 Update.
2003-12-02  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/elf/initfini.c: Add unwind info.

	* sysdeps/ia64/dl-machine.h (elf_machine_matches_host): Mark with
	attribute "unused".
	(elf_machine_dynamic): Mark with attributes "unused" and "const".
	(elf_machine_runtime_setup): Likewise.

	* sysdeps/generic/dl-fptr.c (make_fptr_table): Mark with
	attribute "always_inline".
	* sysdeps/ia64/dl-machine.h (__ia64_init_bootstrap_fdesc_table):
	Likewise.

	* configure.in: Check whether compiler has libunwind support.
	* config.make.in (have-cc-with-libunwind): New variable.
	* config.h.in (HAVE_CC_WITH_LIBUNWIND): New macro.
	* Makeconfig (gnulib): If have-cc-withh-libunwind is "yes", also
	mention -lunwind.

003-11-12  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/unix/sysv/linux/ia64/sysdep.h: Define DO_CALL_VIA_BREAK.
	Redefine DO_CALL to use vdso if supported, otherwise DO_CALL_VIA_BREAK.
	Likewise for DO_INLINE_SYSCALL.  Make INTERNAL_SYSCALL use
	DO_INLINE_SYSCALL.

	* sysdeps/unix/sysv/linux/ia64/vfork.S: Use DO_CALL_VIA_BREAK()
	instead of DO_CALL().

	* sysdeps/unix/sysv/linux/ia64/clone2.S: Use break directly instead
	of DO_CALL().

	* sysdeps/unix/sysv/linux/ia64/brk.S (__curbrk): Restructure it
	to take advantage of DO_CALL() macro.
	* sysdeps/unix/sysv/linux/ia64/setcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/ia64/getcontext.S: Likewise.

	* elf/rtld.c (dl_main): Restrict dl_sysinfo_dso check to first
	program header.  On ia64, the check failed previously because
	there are two program headers.

	* sysdeps/generic/s_nexttowardf.c: Likewise.
	* math/bug-nexttoward.c: New file.
2003-12-10 23:02:33 +00:00
Roland McGrath 7f08f55a9f * sysdeps/unix/sysv/linux/speed.c
(cfsetospeed): Only set c_ospeed under [_HAVE_STRUCT_TERMIOS_C_OSPEED].
	(cfsetispeed): Only set c_ispeed under [_HAVE_STRUCT_TERMIOS_C_ISPEED].
	* sysdeps/unix/sysv/linux/bits/termios.h
	(_HAVE_STRUCT_TERMIOS_C_ISPEED, _HAVE_STRUCT_TERMIOS_C_OSPEED): Define.
	* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
2003-09-09 07:01:01 +00:00
Ulrich Drepper 6162364368 Update.
2003-06-22  Ulrich Drepper  <drepper@redhat.com>

	* pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
	(__pthread_mutex_lock_internal): Likewise.
	(__pthread_mutex_unlock_internal): Likewise.
	(__pthread_mutex_unlock_usercnt): Declare.
	* pthread_mutex_destroy.c: Always fail if used in any way.
	* pthread_mutex_init.c: Update comment.
	* pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
	* pthread_mutex_timedlock.c: Adjust __nusers.
	* pthread_mutex_trylock.c: Adjust __nusers.
	* pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
	and public interfaces are wrapper with pass additional parameter.
	__pthread_mutex_unlock_usercnt does not adjust __nusers if second
	parameter zero.
	* tst-mutex8.c: New file.
	* Makefile (tests): Add tst-mutex8.
	* sysdeps/pthread/pthread_cond_timedwait.c: Call
	__pthread_mutex_unlock_usercnt.
	* sysdeps/pthread/pthread_cond_wait.c: 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.
	* sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
	* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
	Add __nusers.
	* sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.

	* pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
	* pthread_mutex_timedlock.c: Likewise.
	* pthread_mutex_trylock.c: Adjust __nusers.
	* pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
	* tst-mutex9.c: New file.
	* Makefile (tests): Add tst-mutex9.
	* sysdeps/i386/tls.h: Remove THREAD_ID definition.
	* sysdeps/ia64/tls.h: Likewise.
	* sysdeps/powerpc/tls.h: Likewise.
	* sysdeps/s390/tls.h: Likewise.
	* sysdeps/sh/tls.h: Likewise.
	* sysdeps/x86_64/tls.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
	Change type of __owner.
	* sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2003-06-22 23:55:27 +00:00
Ulrich Drepper e55674c65e (TLS_INIT_TP): Include \n in error message. 2003-05-06 05:40:11 +00:00
Ulrich Drepper 9a7178d611 Update.
2003-05-01  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/tls.h: Define THREAD_ID.
	* sysdeps/ia64/tls.h: Likewise.
	* sysdeps/powerpc/tls.h: Likewise.
	* sysdeps/s390/tls.h: Likewise.
	* sysdeps/sh/tls.h: Likewise.
	* sysdeps/x86_64/tls.h: Likewise.
	* pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
	record ownership.
	* pthread_mutex_timedlock.c: Likewise.
	* pthread_mutex_trylock.c: Likewise.
	* pthread_mutex_unlock.c: Likewise.
	* pthread_rwlock_trywrlock.c: Likewise.
	* sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
	* sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
	* sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
	* sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.

	* sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
	flag.
2003-05-01 23:19:51 +00:00
Ulrich Drepper bd4f43b462 Update.
2003-04-14  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/i386/i486/bits/atomic.h: Rename LOCK to LOCK_PREFIX.
	* sysdeps/x86_64/bits/atomic.h: Likewise.

2003-04-14  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysdep.h: Change PUSHARGS_1 and
	POPARGS_1 to emit labels for the mov instructions.

2003-04-14  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (ret_NOERRNO): Define.
2003-04-14 17:30:34 +00:00
Ulrich Drepper b22d701bb7 Update.
2003-04-04  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/pthread/createthread.c (create_thread): Add some more
	comments explaining when to set multiple_threads and when not.

	* pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
	THREAD_ATOMIC_BIT_SET if not already defined.
	* sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
	THREAD_ATOMIC_BIT_SET:
	* sysdeps/x86_64/tls.h: Likewise.
	* cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
	THREAD_ATOMIC_CMPXCHG_VAL.
	(_pthread_cleanup_pop_restore): Likewise.
	* cancellation.c (__pthread_enable_asynccancel): Likewise.
	(__pthread_enable_asynccancel_2): Likewise.
	(__pthread_disable_asynccancel): Likewise.
	* libc-cancellation.c (__libc_enable_asynccancel): Likewise.
	(__libc_disable_asynccancel): Likewise.
	* init.c (sigcancel_handler): Likewise.
	* pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
	* pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
2003-04-05 05:21:15 +00:00
Ulrich Drepper f877b33831 (CALL_THREAD_FCT): Align stack of called function correctly. 2003-04-01 00:53:02 +00:00
Ulrich Drepper e22a221d6b Update.
2003-03-14  Ulrich Drepper  <drepper@redhat.com>

	* tst-fork4.c: Use test-skeleton.c.

	* pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
	* sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
2003-03-14 23:28:23 +00:00
Roland McGrath 55c11fbdb0 2003-03-14 Roland McGrath <roland@redhat.com>
* descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
	we always define the padding space.
	[!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
	stopped supporting its own extensions fully.
	[TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
	struct also called `header', so `header.multiple_threads' is the field
	name to use on all machines.
	* allocatestack.c (allocate_stack): Use `header.' prefix.
	* sysdeps/pthread/createthread.c (create_thread): Likewise.
	* pthread_create.c (__pthread_create_2_1): Likewise.
	* sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
	(THREAD_SELF): Likewise.
	* sysdeps/x86_64/tls.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
2003-03-14 22:34:02 +00:00
Ulrich Drepper 5a03acfe37 Update.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_once.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_trywait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.

	* sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
	THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.

	* allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
	Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
	* sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
	(create_thread): Likewise.
	Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
	* init.c (__pthread_initialize_minimal_internal): Initialize
	__libc_multiple_threads_ptr if necessary.
	* pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
	__pthread_multiple_threads and __libc_multiple_threads_ptr.
	* sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
	__libc_multiple_threads.
	(__libc_pthread_init): Return pointer to __libc_pthread_init if
	necessary.

	* sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
	(THREAD_SETMEM_NC): Likewise.

	* sysdeps/x86_64/pthread_spin_trylock.c: Removed.
	* sysdeps/x86_64/pthread_spin_trylock.S: New file.
	* sysdeps/x86_64/pthread_spin_unlock.c: Removed.
	* sysdeps/x86_64/pthread_spin_unlock.S: New file.

	* sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
	Eliminate one entire instruction.
2003-03-12 05:45:00 +00:00
Roland McGrath d4f64e1ad7 2003-03-10 Roland McGrath <roland@redhat.com>
* allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
	Instead of setting PD->multiple_threads, set globals
	__pthread_multiple_threads and __libc_multiple_threads.
	* sysdeps/pthread/createthread.c (create_thread): Likewise.
	* sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
	* sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
	* descr.h (struct pthread): Conditionalize first member on
	[!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
	containing an anonymous tcbhead_t.  Move `list' member out.
	[TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
	* allocatestack.c: Remove use of `header.data.' prefix.
	* pthread_create.c: Likewise.
	* init.c (__pthread_initialize_minimal_internal): Likewise.
	* sysdeps/pthread/createthread.c (create_thread): Likewise.
	* sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
	(THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
	* sysdeps/x86_64/tls.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
	* sysdeps/s390/tls.h (tcbhead_t): Likewise.
2003-03-10 08:50:36 +00:00
Ulrich Drepper fd1a0d0c7c Update.
2003-02-23  Ulrich Drepper  <drepper@redhat.com>

	* resolv/res_libc.c [USE___THREAD] (_res): Initialize _vcsock
	element to -1.
2003-02-23 09:16:11 +00:00
Ulrich Drepper a1f8ec97fd Update.
2003-01-15  Dmitry V. Levin  <ldv@altlinux.org>

	* sysdeps/unix/sysv/linux/ptsname.c: Fix typo in comment.
2003-01-16 18:14:10 +00:00
Ulrich Drepper 3b7ed87125 Update.
2002-12-28  Ulrich Drepper  <drepper@redhat.com>

	* misc/sys/cdefs.h (__attribute_deprecated__): New #define.
2002-12-28 22:19:04 +00:00
Ulrich Drepper 131fd126cd Update.
2002-12-28  Ulrich Drepper  <drepper@redhat.com>

	* descr.h (struct pthread): Move header.data.list to the back of the
	struct.
	* sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
	(MULTIPLE_THREADS_OFFSET): Adjust offset.
	(SYSINFO_OFFSEET): Likewise.

2002-12-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
	Define.
	(DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
	* sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
	DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
	(USE_DL_SYSINFO): Undef.

2002-12-22  Jakub Jelinek  <jakub@redhat.com>

	* Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
	$(common-objpfx)libc.so.
	* tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
	it is bigger than pipe buffer size even on arches with bigger
	page size.
	(tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
2002-12-28 09:27:26 +00:00
Ulrich Drepper 097eca29e8 Update.
* sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
	of int $0x80.
	* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.

	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
	sysenter.
	* sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.

	* sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
2002-12-20 07:12:24 +00:00
Ulrich Drepper df45b31e81 Update.
2002-12-18  Ulrich Drepper  <drepper@redhat.com>

	* descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
	* sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
	Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
	(INIT_SYSINFO): New #define.
	(TLS_TP_INIT): Use INIT_SYSINFO.
	* sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
	At test to make sure SYSINFO_OFFSET value is correct.
	* sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2002-12-19 07:09:42 +00:00
Ulrich Drepper 9ae0909b35 Update.
2002-12-13  Ulrich Drepper  <drepper@redhat.com>

	* misc/syslog.c (log_cleanup): Don't use parameter in
	__libc_lock_unlock call, use syslog_lock directly.  Adjust callers to
	pass NULL instead of a pointer to syslog_lock.
2002-12-13 10:59:14 +00:00
Roland McGrath fde89ad009 * sysdeps/generic/libc-tls.c (__libc_setup_tls): Cope with zero ALIGN.
* malloc/hooks.c [_LIBC && (USE___THREAD || (USE_TLS && !SHARED))]
	(malloc_starter, memalign_starter, free_starter): Don't define these.
	* malloc/malloc.c [_LIBC && (USE___THREAD || (USE_TLS && !SHARED))]:
	Don't declare them either.
	* malloc/arena.c (ptmalloc_init) [_LIBC && USE_TLS]: Don't call
	__pthread_initialize, so no need to set hooks to *_starter.
	(ptmalloc_init_minimal): New function, broken out of ptmalloc_init.
	[_LIBC && SHARED && USE_TLS && !USE___THREAD]
	(__libc_malloc_pthread_startup): New function.
	* malloc/Versions (libc: GLIBC_PRIVATE): New set, add that function.

	* malloc/hooks.c (memalign_starter): New function.
	* malloc/malloc.c: Declare it.
	* malloc/arena.c (save_memalign_hook): New variable.
	(ptmalloc_init): Set __memalign_hook to memalign_starter.

	* elf/dl-minimal.c (free): Clear the memory.
	(calloc): Just call malloc, knowing all memory it returns is cleared.

	* sysdeps/generic/dl-tls.c (allocate_dtv): Use calloc instead of
	malloc and memset; calloc can avoid the zeroing when redundant.
	(_dl_tls_setup): Likewise.
	* elf/dl-load.c (decompose_rpath): Likewise.
	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Comment out memset
	call, since memory from sbrk at startup is already zero.

	* elf/rtld.c (_dl_start, dl_main): TLS_INIT_TP macro now returns an
	error string for failure, null for success.  Update callers.
	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Likewise.
	* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
2002-12-06 11:15:07 +00:00
Ulrich Drepper 33b5d0cc7f Update.
2002-12-05  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/i386/tls.h: Include stdlib.h.
	* sysdeps/x86_64/tls.h: Likewise.
2002-12-05 00:44:01 +00:00
Ulrich Drepper 117c452c98 Update.
* sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
	takes the array member name and the index as parameters.
	(THREAD_SETMEM_NC): Likewise.
	* pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
	* pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
	interfaces.

	* sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
	to decide which code to use.
	(THREAD_SETMEM_NC): Likewise.
2002-11-27 07:09:18 +00:00
Ulrich Drepper 76a50749f7 Initial revision
2002-11-26  Ulrich Drepper  <drepper@redhat.com>
	* allocatestack.c (queue_stack): Don't remove stack from list here.
	Do it in the caller.  Correct condition to prematurely terminate
	loop to free stacks.
	(__deallocate_stack): Remove stack from list here.
2002-11-26  Ulrich Drepper  <drepper@redhat.com>
	* Makefile (tests): Add tst-stack1.
	* tst-stack1.c: New file.
	* allocatestack.c (allocate_stack): Initialize the TCB on a user
	provided stack.
	* pthread_attr_getstack.c: Return bottom of the thread area.
2002-11-25  Ulrich Drepper  <drepper@redhat.com>
	* Makefile (libpthread-routines): Add pt-allocrtsig and
	pthread_kill_other_threads.
	* pt-allocrtsig.c: New file.
	* pthread_kill_other_threads.c: New file.
	* sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
	all three functions.
	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
	allocrtsig.
	* sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
	__libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
	and __libc_allocate_rtsig_private.
	* Versions (libpthread): Export pthread_kill_other_threads_np,
	__libc_current_sigrtmin, and __libc_current_sigrtmax.
2002-11-24  Ulrich Drepper  <drepper@redhat.com>

	* allocatestack.c (allocate_stack): stackaddr in attribute points to
	the end of the stack.  Adjust computations.
	When mprotect call fails dequeue stack and free it.
	* pthread_attr_setstack.c: Store top of the stack in stackaddr
	attribute.
	* pthread_getattr_np.c: Likewise.

	* descr.h (IS_DETACHED): Add some more parenthesis to prevent
	surprises.

2002-11-23  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
	attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.

2002-11-22  Ulrich Drepper  <drepper@redhat.com>

	* pthread_getspecific.c: Optimize access to first 2nd-level array.
	* pthread_setspecific.c: Likewise.

2002-11-21  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
	definitions.  Get them from the official place.
	* sysdeps/unix/sysv/linux/i386/fork.c: Likewise.

	* sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
	Use new CLONE_ flags in clone() calls.

	* sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
	* sysdeps/unix/sysv/linux/i386/fork.c: New file.

	* Versions: Add pthread_* functions for libc.
	* forward.c: New file.

	* sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
	errno-loc.
	* herrno.c: New file.
	* res.c: New file.

	* Makefile (libpthread-routines): Remove sem_post, sem_wait,
	sem_trywait, and sem_timedwait.  Add herrno and res.
	* sem_init.c: Don't initialize lock and waiters members.
	* sem_open.c: Likewise.
	* sem_post.c: Removed.
	* sem_wait.c: Removed.
	* sem_trywait.c: Removed.
	* sem_timedwait.c: Removed.
	* sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
	Includes full implementations of sem_post, sem_wait, sem_trywait,
	and sem_timedwait.
	* sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
	for new implementation.
	* sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
	and waiters fields.

	* tst-sem3.c: Improve error message.
	* tst-signal3.c: Likewise.

	* init.c (__pthread_initialize_minimal): Use set_tid_address syscall
	to tell the kernel about the termination futex and to initialize tid
	member.  Don't initialize main_thread.
	* descr.h (struct pthread): Remove main_thread member.
	* cancelllation.c (__do_cancel): Remove code handling main thread.
	The main thread is not special anymore.

	* allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
	size of the stacks to stack_cache_actsize.

	* pt-readv.c: Add missing "defined".
	* pt-sigwait.c: Likewise.
	* pt-writev.c: Likewise.

2002-11-09  Ulrich Drepper  <drepper@redhat.com>

	* Versions: Export __connect from libpthread.
	Patch by Luca Barbieri <ldb@ldb.ods.org>.

	* Makefile (libpthread-routines): Add pt-raise.
	* sysdeps/unix/sysv/linux/raise.c: New file.
	* sysdeps/unix/sysv/linux/pt-raise.c: New file.
	* sysdeps/generic/pt-raise.c: New file.

	* pthread_cond_init.c: Initialize all data elements of the condvar
	structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.

	* pthread_attr_init.c: Actually implement 2.0 compatibility version.
	* pthread_create.c: Likewise.

	* Makefile (tests): Add tst-key1, tst-key2, tst-key3.
	* tst-key1.c: New file.
	* tst-key2.c: New file.
	* tst-key3.c: New file.

	* Versions: Export pthread_detach for version GLIBC_2.0.
	Reported by Saurabh Desai <sdesai@austin.ibm.com>.

2002-11-08  Ulrich Drepper  <drepper@redhat.com>

	* pthread_key_create.c: Terminate search after an unused key was found.
	Patch by Luca Barbieri <ldb@ldb.ods.org>.

	* sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
	Patch by Luca Barbieri <ldb@ldb.ods.org>.

2002-10-10  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
	dynamic lookup for errno in PIC.

	* allocatestack.c (get_cached_stack): Rearrange code slightly to
	release the stack lock as soon as possible.
	Call _dl_allocate_tls_init for TCB from the cache to re-initialize
	the static TLS block.
	(allocate_stack): Call _dl_allocate_tls_init for user-provided stack.

	* cancellation.c: Renamed from cancelation.c.
	* Makefile: Adjust accordingly.
	* pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
	* cleanup_defer.c: Use CANCELLATION_P.
	* pthread_testcancel.c: Likewise.
	* descr.h: Fix spelling in comments.
	* init.c: Likewise.
	* pthread_getattr_np.c: Likewise.
	* pthread_getschedparam.c: Likewise.
	* pthread_setschedparam.c: Likewise.
	* Versions: Likewise.

	* pt-pselect.c: New file.
	* Makefile (libpthread-routines): Add pt-pselect.
	* Versions: Add pselect.

	* tst-cancel4.c: New file.
	* Makefile (tests): Add tst-cancel4.

2002-10-09  Ulrich Drepper  <drepper@redhat.com>

	* pthread_mutex_lock.c: Always record lock ownership.
	* pthread_mutex_timedlock.c: Likewise.
	* pthread_mutex_trylock.c: Likewise.

	* pt-readv.c: New file.
	* pt-writev.c: New file.
	* pt-creat.c: New file.
	* pt-msgrcv.c: New file.
	* pt-msgsnd.c: New file.
	* pt-poll.c: New file.
	* pt-select.c: New file.
	* pt-sigpause.c: New file.
	* pt-sigsuspend.c: New file.
	* pt-sigwait.c: New file.
	* pt-sigwaitinfo.c: New file.
	* pt-waitid.c: New file.
	* Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
	pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
	pt-sigwait, pt-sigwaitinfo, and pt-waitid.
	* Versions: Add all the new functions.

	* tst-exit1.c: New file.
	* Makefile (tests): Add tst-exit1.

	* sem_timedwait.c: Minor optimization for more optimal fastpath.

2002-10-08  Ulrich Drepper  <drepper@redhat.com>

	* pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.

	* pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
	call.  pthread_join is an official cancellation point.
	* pthread_timedjoin.c: Likewise.

	* pthread_cond_wait.c: Revert order in which internal lock are dropped
	and the condvar's mutex are retrieved.
	* pthread_cond_timedwait.c: Likewise.
	Reported by dice@saros.East.Sun.COM.

2002-10-07  Ulrich Drepper  <drepper@redhat.com>

	* pthreadP.h: Cut out all type definitions and move them...
	* sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
	* pthreadP.h: Include <internaltypes.h>.

	* sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
	performance tweaks.

	* sem_trywait.c: Shuffle #includes around to get right order.
	* sem_timedwait.c: Likewise.
	* sem_post.c: Likewise.
	* sem_wait.c: Likewise.

	* nptl 0.3 released.

	* Makefile (tests): Add tst-signal3.
	* tst-signal3.c: New file.

2002-10-05  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
	the asms modify the sem object.
	(__lll_sem_timedwait): Now takes struct sem* as first parameter.

	* sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
	the actual members.
	* pthreadP.h (struct sem): New type.  Actual semaphore type.
	* semaphoreP.h: Include pthreadP.h.
	* sem_getvalue.c: Adjust to sem_t change.
	* sem_init.c: Likewise.
	* sem_open.c: Likewise.
	* sem_post.c: Likewise.
	* sem_timedwait.c: Likewise.
	* sem_trywait.c: Likewise.
	* sem_wait.c: Likewise.

2002-10-04  Ulrich Drepper  <drepper@redhat.com>

	* Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
	* tst-basic2.c: New file.
	* tst-exec1.c: New file.
	* tst-exec2.c: New file.
	* tst-exec3.c: New file.

	* tst-fork1.c: Remove extra */.

	* nptl 0.2 released.  The API for IA-32 is complete.
2002-11-26 22:50:54 +00:00