Age | Commit message (Collapse) | Author |
|
t/fix_have_kernel_resources
|
|
|
|
|
|
|
|
|
|
* tests/Makefile [ifdef INSTALL_ROOT] (INSTALL_ROOT_CPPFLAGS)
(INSTALL_ROOT_LDFLAGS): New variables.
(%.o: %.c, %: %.o): New rules.
(%-static: %.o): Update rule.
* tests/README: Update.
|
|
* sysdeps/i386/Implies: Remove file.
* sysdeps/mach/hurd/i386/Implies: Likewise.
* sysdeps/ia32/bits/memory.h: Rename to sysdeps/i386/bits/memory.h.
* sysdeps/ia32/bits/pt-atomic.h: Rename to sysdeps/i386/bits/pt-atomic.h.
* sysdeps/ia32/bits/spin-lock-inline.h: Rename to
sysdeps/i386/bits/spin-lock-inline.h.
* sysdeps/ia32/bits/spin-lock.h: Rename to sysdeps/i386/bits/spin-lock.h.
* sysdeps/ia32/machine-sp.h: Rename to sysdeps/i386/machine-sp.h.
* sysdeps/ia32/pt-machdep.h: Rename to sysdeps/i386/pt-machdep.h.
* sysdeps/mach/hurd/ia32/pt-machdep.c: Rename to
sysdeps/mach/hurd/i386/pt-machdep.c.
* sysdeps/mach/hurd/ia32/pt-setup.c: Rename to
sysdeps/mach/hurd/i386/pt-setup.c.
* Makefile (SYSDEP_PATH): Adapt to that.
|
|
* sysdeps/powerpc/bits/machine-lock.h: Remove file.
* sysdeps/powerpc/bits/memory.h: Likewise.
* sysdeps/powerpc/bits/spin-lock.h: Likewise.
* sysdeps/powerpc/machine-sp.h: Likewise.
* sysdeps/powerpc/pt-machdep.h: Likewise.
* TODO: Update.
|
|
|
|
* Makefile.am: Remove file.
* headers.m4: Likewise.
* sysdeps/l4/bits/pthread-np.h: Likewise.
* sysdeps/l4/hurd/bits/pthread-np.h: Likewise.
* sysdeps/l4/hurd/ia32/pt-machdep.c: Likewise.
* sysdeps/l4/hurd/ia32/pt-setup.c: Likewise.
* sysdeps/l4/hurd/ia32/signal-dispatch-lowlevel.c: Likewise.
* sysdeps/l4/hurd/powerpc/pt-machdep.c: Likewise.
* sysdeps/l4/hurd/powerpc/pt-setup.c: Likewise.
* sysdeps/l4/hurd/pt-block.c: Likewise.
* sysdeps/l4/hurd/pt-kill.c: Likewise.
* sysdeps/l4/hurd/pt-setactivity-np.c: Likewise.
* sysdeps/l4/hurd/pt-sigstate-destroy.c: Likewise.
* sysdeps/l4/hurd/pt-sigstate-init.c: Likewise.
* sysdeps/l4/hurd/pt-sigstate.c: Likewise.
* sysdeps/l4/hurd/pt-startup.c: Likewise.
* sysdeps/l4/hurd/pt-sysdep.c: Likewise.
* sysdeps/l4/hurd/pt-sysdep.h: Likewise.
* sysdeps/l4/hurd/pt-thread-alloc.c: Likewise.
* sysdeps/l4/hurd/pt-thread-halt.c: Likewise.
* sysdeps/l4/hurd/pt-thread-start.c: Likewise.
* sysdeps/l4/hurd/pt-wakeup.c: Likewise.
* sysdeps/l4/hurd/sig-sysdep.h: Likewise.
* sysdeps/l4/hurd/sigprocmask.c: Likewise.
* sysdeps/l4/pt-block.c: Likewise.
* sysdeps/l4/pt-docancel.c: Likewise.
* sysdeps/l4/pt-pool-np.c: Likewise.
* sysdeps/l4/pt-spin.c: Likewise.
* sysdeps/l4/pt-stack-alloc.c: Likewise.
* sysdeps/l4/pt-thread-alloc.c: Likewise.
* sysdeps/l4/pt-thread-dealloc.c: Likewise.
* sysdeps/l4/pt-thread-halt.c: Likewise.
* sysdeps/l4/pt-thread-start.c: Likewise.
* sysdeps/l4/pt-timedblock.c: Likewise.
* sysdeps/l4/pt-wakeup.c: Likewise.
* TODO: Update.
* signal/README: Likewise.
|
|
* Makefile ($(inst_libdir)/libpthread.so): Symlink from absolute path
$(slibdir)/libpthread.so$(libpthread.so-version) instead of relative, as
both files may not be in the same directory (e.g. in Debian).
|
|
* Makefile (inst_libdir) [!IN_GLIBC]: Set variable to $(libdir) instead of
expanding it.
|
|
Later rounded up to a page.
* sysdeps/generic/pt-attr.c (__pthread_default_attr) [!PAGESIZE]: Set guardsize
field to 1.
|
|
* pthread/pt-internal.h (guardsize): Mention that we depart from the
standard which says guardsize is in addition to stacksize.
|
|
|
|
* libpthread.a (GROUP): Add -lrt.
|
|
* sysdeps/mach/hurd/pt-sysdep.h (_HURD_THREADVAR_THREAD): Remove macro.
(___pthread_self): Declare new __thread variable.
(_pthread_self): Take self pointer from ___pthread_self instead of
threadvar.
* sysdeps/mach/hurd/pt-sysdep.c (___pthread_self): Define new __thread
variable.
(init_routine): Set ___pthread_self to initial thread structure.
* pthread/pt-internal.h (__pthread_setup): Add `self' parameter to
`entry_point' parameter.
* pthread/pt-create.c (entry_point): Add `self' parameter. Store it in
___pthread_self.
* sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Add `self parameter to
`entry_point' parameter. Pass it the `thread' parameter.
(__pthread_setup): Likewise.
* sysdeps/l4/hurd/powerpc/pt-setup.c (struct start_info): Add `self' field.
(first_entry_1): Pass `self' parameter.
(stack_setup): Add `self' parameter to `entry_point' parameter, pass it the
`thread' parameter.
(__pthread_setup): Likewise.
* sysdeps/mach/hurd/ia32/pt-setup.c (stack_setup): Pass `thread' parameter
to the start routine.
(stack_setup): Add `self' parameter to `entry_point' paramter.
|
|
* pthread/pt-initialize.c (pthread_functions): Always define.
(__pthread_init): Always pass address of pthread_functions.
|
|
The former conflicts with usage in glibc.
* pthread/pt-initialize.c (__pthread_initialize): Rename into
__pthread_init.
* pthread/pt-internal.h (__pthread_initialize): Likewise.
* sysdeps/l4/hurd/pt-sysdep.c (init_routine): Likewise.
* sysdeps/mach/hurd/pt-sysdep.c (init_routine): Likewise.
|
|
* Makeconfig (+includes): Add our include/ directory in the header include
path, for the rest of glibc.
|
|
|
|
* Makefile [IN_GLIBC=no] (inst_libdir): Define to $(libdir).
(install, .PHONY, libpthread2.a, libpthread2_pic.a): Use $(inst_libdir)
instead of $(libdir), enable in IN_GLIBC=yes too.
[IN_GLIBC=yes] ($(inst_libdir)/libpthread.so): Define to create symlink.
|
|
And make it expose only types, not the rest of the pthread API.
* Makefile (headers): Add bits/pthreadtypes.h.
* sysdeps/generic/bits/pthreadtypes.h: Include <pthread/pthreadtypes.h>
instead of <pthread.h>
|
|
* Makefile (extra-B-pthread.so): Define.
|
|
If CLOCK_MONOTONIC is requested, check (only once) for the
availability of a monotonic clock using `clock_getres'. If it is not,
reject CLOCK_MONOTONIC with EINVAL (as before).
* sysdeps/generic/pt-condattr-setclock.c (pthread_condattr_setclock):
Check for monotonic clock if requested.
|
|
Use `clock_gettime' with the provided clock instead of `gettimeofday',
linking to rt.
* sysdeps/mach/pt-timedblock.c (__pthread_timedblock): Switch to
`clock_gettime'.
* Makefile [!IN_GLIBC] (LDLIBS): Link to rt.
[IN_GLIBC] ($(objpfx)libpthread.so): Likewise.
* Makefile.am (libpthread_a_LDADD): Likewise.
|
|
To make `__pthread_timedblock' properly measure time using the right
clock, add a new argument representing the clock to use.
* pthread/pt-internal.h (__pthread_timedblock): New argument CLOCK_ID.
* sysdeps/l4/pt-timedblock.c (__pthread_timedblock): Likewise.
* sysdeps/mach/pt-timedblock.c (__pthread_timedblock): Likewise.
* sysdeps/generic/pt-cond-timedwait.c
(__pthread_cond_timedwait_internal): Pass the clock of the
`pthread_cond' to `__pthread_timedblock'.
* sysdeps/generic/pt-mutex-timedlock.c
(__pthread_mutex_timedlock_internal): Pass CLOCK_REALTIME to
`__pthread_timedblock'.
* sysdeps/generic/pt-rwlock-timedrdlock.c
(__pthread_rwlock_timedrdlock_internal): Likewise.
* sysdeps/generic/pt-rwlock-timedwrlock.c
(__pthread_rwlock_timedwrlock_internal): Likewise.
* sysdeps/generic/sem-timedwait.c (__sem_timedwait_internal):
Likewise.
|
|
* Makeconfig, Versions, configure.in, forward.c, libc_pthread_init.c,
pthread/pthread-functions.h, shlib-versions, sysdeps/i386/Implies,
sysdeps/mach/hurd/Implies, sysdeps/mach/hurd/i386/Implies: New files.
* Makefile: Add glibc rules, enabled when IN_GLIBC is defined to yes, when
$(..) is defined.
* pthread/pt-initialize.c [IS_IN_libpthread] (pthread_functions): New variable.
[IS_IN_libpthread] (__pthread_initialize): Call __libc_pthread_init.
|
|
* pthread/pt-internal.h (tcbhead_t): Define struct only if IS_IN_libpthread
is not defined.
|
|
This avoids a conflict with glibc-provided bits/atomic.h
* sysdeps/ia32/bits/atomic.h: Rename to...
* sysdeps/ia32/bits/pt-atomic.h: ... this.
* pthread/pt-create.c: Include <bits/pt-atomic.h> instead of <bits/atomic.h>
* pthread/pt-exit.c: Likewise.
* pthread/pt-internal.h: Likewise.
|
|
Libc will need to be able to call them, so they need to have a different
name.
* pthread/pt-exit.c (pthread_exit): Rename with __ prefix and add strong alias.
* pthread/pt-self.c (pthread_self): Likewise.
* pthread/pt-setcancelstate.c (pthread_setcancelstate): Likewise
* pthread/pt-setcanceltype.c (pthread_setcanceltype): Likewise
* sysdeps/generic/pt-attr-destroy.c (pthread_attr_destroy): Likewise
* sysdeps/generic/pt-attr-getdetachstate.c (pthread_attr_getdetachstate): Likewise
* sysdeps/generic/pt-attr-getinheritsched.c (pthread_attr_getinheritsched): Likewise
* sysdeps/generic/pt-attr-getschedparam.c (pthread_attr_getschedparam): Likewise
* sysdeps/generic/pt-attr-getschedpolicy.c (pthread_attr_getschedpolicy): Likewise
* sysdeps/generic/pt-attr-getscope.c (pthread_attr_getscope): Likewise
* sysdeps/generic/pt-attr-init.c (pthread_attr_init): Likewise
* sysdeps/generic/pt-attr-setdetachstate.c (pthread_attr_setdetachstate): Likewise
* sysdeps/generic/pt-attr-setinheritsched.c (pthread_attr_setinheritsched): Likewise
* sysdeps/generic/pt-attr-setschedparam.c (pthread_attr_setschedparam): Likewise
* sysdeps/generic/pt-attr-setschedpolicy.c (pthread_attr_setschedpolicy): Likewise
* sysdeps/generic/pt-attr-setscope.c (pthread_attr_setscope): Likewise
* sysdeps/generic/pt-cond-brdcast.c (pthread_cond_broadcast): Likewise
* sysdeps/generic/pt-cond-destroy.c (pthread_cond_destroy): Likewise
* sysdeps/generic/pt-cond-init.c (pthread_cond_init): Likewise
* sysdeps/generic/pt-cond-signal.c (pthread_cond_signal): Likewise
* sysdeps/generic/pt-cond-timedwait.c (pthread_cond_timedwait): Likewise
* sysdeps/generic/pt-cond-wait.c (pthread_cond_wait): Likewise
* sysdeps/generic/pt-condattr-destroy.c (pthread_condattr_destroy): Likewise
* sysdeps/generic/pt-condattr-init.c (pthread_condattr_init): Likewise
* sysdeps/generic/pt-equal.c (pthread_equal): Likewise
* sysdeps/generic/pt-getschedparam.c (pthread_getschedparam): Likewise
* sysdeps/generic/pt-setschedparam.c (pthread_setschedparam): Likewise
|
|
libc releases the spinlock before calling __mutex_unlock_solid, so we have to
try to reacquire it before possibly giving it to some blocked thread.
* pthread/cthreads-compat.c (__mutex_unlock_solid): Call
__pthread_spin_trylock before calling __pthread_mutex_unlock.
|
|
* include/pthread/pthread.h [__USE_XOPEN2K8] (PTHREAD_MUTEX_NORMAL,
PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_DEFAULT,
pthread_mutexattr_gettype, pthread_mutexattr_settype): Expose.
|
|
|
|
When getting a TSD, handle gracefully the case of an invalid key.
When setting a TSD, check for the validity of the key as recommended
(although not required) by POSIX. This also avoids potentially
filling the `thread_specifics' hash of threads with TSD of invalid
keys.
Add two simple checks in test-7.c for the two situations above.
* sysdeps/hurd/pt-getspecific.c (pthread_getspecific): Check the
validity of the specified key.
* sysdeps/hurd/pt-setspecific.c (pthread_setspecific): Likewise.
* tests/test-7.c (main): Add two assertions.
|
|
Conflicts:
tests/Makefile
|
|
* sysdeps/hurd/pt-destroy-specific.c (__pthread_destroy_specific): Correct
logic for PTHREAD_KEY_INVALID slots.
* tests/test-__pthread_destroy_specific-skip.c: New file.
* tests/Makefile (CHECK_SRC): Add test-__pthread_destroy_specific-skip.c.
|
|
When deleting a key using `pthread_key_delete', delete all the values
associated to that key in all the threads available. Otherwise, the
key reuse in `pthread_key_create' can cause new keys to have thread
specific data of the previously used key with the same index.
Add a test for this case, which creates and deletes pairs of keys
checking that they have a NULL thread specific data after creation.
* sysdeps/hurd/pt-key-delete.c (pthread_key_delete): Remove all the
values of the key in all the threads.
* tests/Makefile (CHECK_SRC): Add test-17.c.
* tests/test-17.c: New file.
|
|
t/fix_have_kernel_resources
|
|
Conflicts:
ChangeLog
Makefile
pthread/pt-exit.c
pthread/pt-internal.h
sysdeps/mach/hurd/ia32/pt-setup.c
sysdeps/mach/hurd/pt-docancel.c
sysdeps/mach/hurd/pt-sysdep.h
|
|
* Makefile (CFLAGS): Define ENABLE_TLS.
* pthread/pt-create.c (__pthread_create_internal) [ENABLE_TLS]: Call
into glibc to allocate static TLS block.
* pthread/pt-exit.c (pthread_exit) [ENABLE_TLS]: Call into glibc to
deallocate static TLS block.
* pthread/pt-internal.h [ENABLE_TLS] (tcbhead_t): New structure; as in
glibc.
(__pthread) [ENABLE_TLS]: Add TCB member.
[ENABLE_TLS] (_dl_allocate_tls, _dl_deallocate_tls): Declare; from
glibc.
* sysdeps/mach/hurd/pt-sysdep.h (__thread_set_pcsp): Rename to
__thread_set_pcsptp. Add SET_TP and TP parameters. Change all
callers.
* sysdeps/mach/hurd/i386/pt-machdep.c (__thread_set_pcsptp): Imlement
TLS support.
* sysdeps/mach/hurd/i386/pt-setup.c (__pthread_setup): Likewise.
|
|
t/fix_have_kernel_resources
|
|
Thus, revert a bit of commit 769e2108a0f5fc49eff9f3addbaf5f0646bcb253.
* pthread/cthreads-compat.c: Don't #include <stddef.h>.
|
|
|
|
As required by posix.
* include/pthread/pthread.h: Include <time.h>
|
|
t/fix_have_kernel_resources
|
|
* pthread/cthreads-compat.c: #include <stddef.h> for NULL.
* pthread/pt-exit.c (pthread_exit): Remove stray need_dealloc variable.
* sysdeps/generic/pt-attr-getschedparam.c: #include <string.h> for memcpy.
* sysdeps/mach/hurd/ia32/pt-setup.c (stack_setup): Apply some more typecasting.
* tests/test-1.c: #include <assert.h>.
* tests/test-6.c: Likewise.
* tests/test-7.c: Likewise.
* tests/test-16.c (handler): Take parameters for sa_handler, not sa_sigaction.
|
|
t/fix_have_kernel_resources
|
|
Using clockid_t just for pthread types makes us pull <time.h>, which defines
time(), which may conflict with applications.
* include/pthread/pthread.h (pthread_condattr_getclock,
pthread_condattr_setclock, pthread_getcpuclockid): Use __clockid_t instead
of clockid_t.
* include/pthread/pthreadtypes.h: Include <bits/types.h>, instead of <time.h>
and defining clockid_t ourself when not defined by time.h.
* sysdeps/generic/bits/condition-attr.h: Include <bits/types.h> instead of
<time.h>.
(__pthread_condattr): Use __clockid_t instead of clockid_t.
|
|
* sysdeps/generic/pt-attr-getschedparam.c (pthread_attr_getschedparam):
memcpy from `attr->schedparam' to `param' to convert from __sched_param
to sched_param.
* sysdeps/generic/pt-attr-setschedparam.c (pthread_attr_setschedparam):
memcpy from `param' to `attr->schedparam' to convert from sched_param
to __sched_param.
|