| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
| |
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
timer_create needs to create threads with all signals blocked,
including SIGTIMER (which happens to equal SIGCANCEL).
Fixes commit b3cae39dcbfa2432b3f3aa28854d8ac57f0de1b8 ("nptl: Start
new threads with all signals blocked [BZ #25098]").
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
| |
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
| |
This introduces the function __pthread_attr_extension to allocate the
extension space, which is freed by pthread_attr_destroy.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
| |
This avoids a spurious memory leak report by valgrind.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
union pthread_attr_transparent has always the correct size, even if
pthread_attr_t has padding that is not present in struct pthread_attr.
This should not result in an observable behavioral change. The
existing code appears to have been correct, but it was brittle because
it was not clear which functions were allowed to write to an entire
pthread_attr_t argument (e.g., by copying it).
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
| |
This avoids duplicating the code for the affinity mask allocation
handling.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
| |
This removes another instance of custom attribute copying code.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
| |
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
| |
* sysdeps/htl/pt-cond-destroy.c (__pthread_cond_destroy): Call
__gsync_wait instead of gsync_wait.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows to reuse the storage after calling pthread_cond_destroy.
* sysdeps/htl/bits/types/struct___pthread_cond.h (__pthread_cond):
Replace unused struct __pthread_condimpl *__impl field with unsigned int
__wrefs.
(__PTHREAD_COND_INITIALIZER): Update accordingly.
* sysdeps/htl/pt-cond-timedwait.c (__pthread_cond_timedwait_internal):
Register as waiter in __wrefs field. On unregistering, wake any pending
pthread_cond_destroy.
* sysdeps/htl/pt-cond-destroy.c (__pthread_cond_destroy): Register wake
request in __wrefs.
* nptl/Makefile (tests): Move tst-cond20 tst-cond21 to...
* sysdeps/pthread/Makefile (tests): ... here.
* nptl/tst-cond20.c nptl/tst-cond21.c: Move to...
* sysdeps/pthread/tst-cond20.c sysdeps/pthread/tst-cond21.c: ... here.
|
|
|
|
|
| |
* nptl/Makefile (tests): Move tst-cond11 and tst-cond27 to...
* sysdeps/pthread/Makefile (tests): ... here.
|
|
|
|
| |
* sysdeps/pthread/tst-cond11.c (do_test): Fix misplaced brace.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function mbstowcs, by an XSI extension to POSIX, accepts a null
pointer for the destination wchar_t array. This API behaviour allows
you to use the function to compute the length of the required wchar_t
array i.e. does the conversion without storing it and returns the
number of wide characters required.
We remove the __write_only__ markup for the first argument because it
is not true since the destination may be a null pointer, and so the
length argument may not apply. We remove the markup otherwise the new
test case cannot be compiled with -Werror=nonnull.
We add a new test case for mbstowcs which exercises the destination is
a null pointer behaviour which we have now explicitly documented.
The mbsrtowcs and mbsnrtowcs behave similarly, and mbsrtowcs is
documented as doing this in C11, even if the standard doesn't come out
and call out this specific use case. We add one note to each of
mbsrtowcs and mbsnrtowcs to call out that they support a null pointer
for the destination.
The wcsrtombs function behaves similarly but in the other way around
and allows you to use a null destination pointer to compute how many
bytes you would need to convert the wide character input. We document
this particular case also, but leave wcsnrtombs as a references to
wcsrtombs, so the reader must still read the details of the semantics
for wcsrtombs.
|
|
|
|
| |
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Validation for pointer returned by backtrace_symbols () added.
Type of variables size and i is changed from size_t to int.
Variable size is used to collect the result from backtrace ()
that is an int. i is the loop counter variable so it can be an int.
Since, size_t size is changed to int size, in printf %zd is changed to %d.
Reviewed-by: DJ Delorie <dj@redhat.com>
|
|
|
|
|
| |
* sysdeps/mach/hurd/fexecve.c (fexecve): Re-lookup fd with O_EXEC before
calling _hurd_exec_paths.
|
|
|
|
|
|
| |
Linux overrides this file via sysdeps/unix/sysv/linux/i386/sysdep.c.
Hurd does not have sysdeps/unix/i386 on its search path, so it uses
csu/sysdep.c instead.
|
|
|
|
|
| |
* sysdeps/mach/hurd/ptsname.c (__ptsname_internal): Replace
not-supported errors from __term_get_peername with ENOTTY.
|
|
|
|
|
| |
* sysdeps/mach/hurd/fdopendir.c (__fdopendir): Lookup "./" instead of
"/" that would designate the root of the filesystem.
|
|
|
|
|
| |
This was needed for 32-bit PV Xen, which has been superseded by this
point according to Xen developers.
|
|
|
|
|
|
|
|
| |
_hurdsig_preemptors and _hurdsig_preempted_set are not ABI symbols,
so do not declare them. HURD_PREEMPT_SIGNAL_P is an implementation
detail, so move it as well.
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
|
|
|
|
|
|
| |
This fixes various build errors due to deprecation warnings.
Fixes commit 02802fafcf6e11ea3f998f685035ffe568dfddeb
("signal: Deprecate additional legacy signal handling functions").
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case the signal arrives before the __mach_msg call, we need to catch
between the sigprocmask call and the __mach_msg call. Let's just reuse
the support for sigsuspend to make the signal send a message that
our __mach_msg call will just receive.
* hurd/hurdselect.c (_hurd_select): Add sigport and ss variables. When
sigmask is not NULL, create a sigport port and register as
ss->suspended. Add it to the portset. When we receive a message on it,
set error to EINTR. Clean up sigport and portset appropriately.
* hurd/hurdsig.c (wake_sigsuspend): Note that pselect also uses it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically, this mechanism was used to process "nosegneg"
subdirectories, and it is still used to include the "tls"
subdirectories. With nosegneg support gone from ld.so, this is part
no longer useful.
The entire mechanism is not well-designed because it causes the
meaning of hwcap bits in ld.so.cache to depend on the kernel version
that was used to generate the cache, which makes it difficult to use
this mechanism for anything else in the future.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
|
|
|
|
| |
This was only ever used for the "nosegneg" flag. This approach for
passing hardware capability information creates a subtle dependency
between the kernel and userspace, and ld.so.cache contents. It seems
inappropriate for toady, where people expect to be able to run
system images which very different kernel versions.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
| |
Since it might change during a readdir call.
Checked on x86_64-linux-gnu and i686-linux-gnu.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* htl/pt-join.c (__pthread_join): Move implementation to...
(__pthread_join_common): ... new function. Add try, timed and clock support.
(__pthread_join): Reimplement on top of __pthread_join_common.
(__pthread_tryjoin_np, __pthread_timedjoin_np, __pthread_clockjoin_np):
Implement on top of __pthread_join_common.
(pthread_tryjoin_np, pthread_timedjoin_np, pthread_clockjoin_np): New
aliases.
* hurd/hurdlock.c (__lll_abstimed_wait, __lll_abstimed_xwait,
__lll_abstimed_lock): Check for supported clock.
* sysdeps/htl/pt-cond-timedwait.c (__pthread_cond_timedwait_internal):
Add clockid parameter and support it.
(__pthread_cond_timedwait): Pass -1 as clockid.
(__pthread_cond_clockwait): New function.
(pthread_cond_clockwait): New alias.
* sysdeps/htl/pt-cond-wait.c (__pthread_cond_timedwait_internal): Update
prototype.
(__pthread_cond_wait): Pass -1 as clockid.
* sysdeps/htl/pt-rwlock-timedrdlock.c
(__pthread_rwlock_timedrdlock_internal): Add clockid parameter, and
support id.
(__pthread_rwlock_clockrdlock): New function.
(pthread_rwlock_clockrdlock): New alias.
* sysdeps/htl/pt-rwlock-rdlock.c (__pthread_rwlock_timedrdlock_internal): Update
prototype.
(__pthread_rwlock_rdlock): Pass -1 as clockid.
* sysdeps/htl/pt-rwlock-timedwrlock.c
(__pthread_rwlock_timedwrlock_internal): Add clockid parameter, and
support id.
(__pthread_rwlock_clockwrlock): New function.
(pthread_rwlock_clockwrlock): New alias.
* sysdeps/htl/pt-rwlock-wrlock.c (__pthread_rwlock_timedwrlock_internal): Update
prototype.
(__pthread_rwlock_wrlock): Pass -1 as clockid.
* sysdeps/mach/hurd/htl/pt-mutex-timedlock.c (__pthread_mutex_timedlock): Move implementation to
(__pthread_mutex_clocklock): New function with additional clockid
parameter and support it.
(pthread_mutex_clocklock): New alias.
(__pthread_mutex_timedlock): Reimplement on top of __pthread_mutex_clocklock.
* sysdeps/htl/pthread.h (pthread_tryjoin_np, pthread_timedjoin_np,
pthread_clockjoin_np, pthread_mutex_clocklock, pthread_cond_clockwait,
pthread_rwlock_clockrdlock, pthread_rwlock_clockwrlock): New prototypes.
* sysdeps/htl/pthreadP.h (__pthread_cond_clockwait): New prototype.
* htl/Versions (GLIBC_2.32): Add pthread_cond_clockwait,
pthread_mutex_clocklock, pthread_rwlock_clockrdlock, pthread_rwlock_clockwrlock,
pthread_tryjoin_np, pthread_timedjoin_np, pthread_clockjoin_np.
* sysdeps/mach/hurd/i386/libpthread.abilist (pthread_clockjoin_np,
pthread_cond_clockwait, pthread_mutex_clocklock, pthread_rwlock_clockrdlock,
pthread_rwlock_clockwrlock, pthread_timedjoin_np, pthread_tryjoin_np):
New functions.
* nptl/tst-abstime.c, nptl/tst-join10.c, nptl/tst-join11.c, nptl/tst-join12.c,
nptl/tst-join13.c, nptl/tst-join14.c, nptl/tst-join2.c, nptl/tst-join3.c,
nptl/tst-join8.c, nptl/tst-join9.c, nptl/tst-mutex-errorcheck.c,
nptl/tst-pthread-mutexattr.c, nptl/tst-mutex11.c, nptl/tst-mutex5.c,
nptl/tst-mutex7.c, nptl/tst-mutex7robus.c, nptl/tst-mutex9.c,
nptl/tst-rwlock12.c, nptl/tst-rwlock14.c: Move to sysdeps/pthread.
* sysdeps/pthread/tst-mutex8.c: Move back to nptl.
* nptl/Makefile (tests): Move tst-mutex5, tst-mutex7, tst-mutex7robust,
tst-mutex9, tst-mutex11, tst-rwlock12, tst-rwlock14, tst-join2, tst-join3,
tst-join8, tst-join9 tst-join10, tst-join11, tst-join12, tst-join13, tst-join14,
tst-abstime, tst-mutex-errorcheck, tst-pthread-mutexattr to ...
* sysdeps/pthread/Makefile (tests): ... here.
|
|
|
|
|
|
|
|
|
|
| |
This needs a few test adjustments: In some cases, sigignore was
used for convenience (replaced with xsignal with SIG_IGN). Tests
for the deprecated functions need to disable
-Wdeprecated-declarations, and for the sigmask deprecation,
-Wno-error.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes it easier to set a breakpoint on these calls.
This also addresses the issue that including <ldsodefs.h> without
<unistd.h> does not result usable _dl_*printf macros because of the
use of the STD*_FILENO macros there.
(The private symbol for _dl_fatal_printf will go away again
once the exception handling implementation is unified between
libc and ld.so.)
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
| |
Enable Intel Silvermont optimization for Intel Goldmont Plus. Detect more
Intel Airmont processors. Optimize Intel Tremont like Intel Silvermont
with rep string instructions.
|
|
|
|
|
|
|
| |
These property values are specified by the AArch64 ELF ABI and
binutils can create binaries marked with them.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
|
| |
This program header type is already used in binaries on x86 and
aarch64 targets.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
| |
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
| |
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
| |
pthread_getattr_default_np needs to make a deep copy.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
| |
Also add the private type union pthread_attr_transparent, to reduce
the amount of casting that is required.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
| |
pthread_attr_destroy needs to be a weak alias to avoid future
linknamespace failures.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of the libpthread removal project:
<https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html>
Use __getline instead of __getdelim to avoid a localplt failure.
Likewise for __getrlimit/getrlimit.
The abilist updates were performed by:
git ls-files 'sysdeps/unix/sysv/linux/**/libc.abilist' \
| while read x ; do
echo "GLIBC_2.32 pthread_getattr_np F" >> $x
done
python3 scripts/move-symbol-to-libc.py --only-linux pthread_getattr_np
The private export of __pthread_getaffinity_np is no longer needed, but
the hidden alias still necessary so that the symbol can be exported with
versioned_symbol.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of the libpthread removal project:
<https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html>
The abilist updates were performed by:
git ls-files 'sysdeps/unix/sysv/linux/**/libc.abilist' \
| while read x ; do
echo "GLIBC_2.32 pthread_getaffinity_np F" >> $x
done
python3 scripts/move-symbol-to-libc.py pthread_getaffinity_np
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of the libpthread removal project:
<https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html>
The symbol did not previously exist in libc, so a new GLIBC_2.32
symbol is needed, to get correct dependency for binaries which
use the symbol but no longer link against libpthread.
The abilist updates were performed by:
git ls-files 'sysdeps/unix/sysv/linux/**/libc.abilist' \
| while read x ; do
echo "GLIBC_2.32 pthread_attr_setaffinity_np F" >> $x
done
python3 scripts/move-symbol-to-libc.py pthread_attr_setaffinity_np
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The stubs for pthread_getaffinity_np, pthread_getname_np,
pthread_setaffinity_np, pthread_setname_np are replaced, and corresponding
tests are moved.
After the removal of the NaCl port, nptl is Linux-specific, and the stubs
are no longer needed. This effectively reverts commit
c76d1ff5149bd03210f2bb8cd64446c51618d016 ("NPTL: Add stubs for Linux-only
extension functions.").
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This fixes a build error:
../sysdeps/unix/sysv/linux/ntp_gettime.c: In function ‘__ntp_gettime’:
../sysdeps/unix/sysv/linux/ntp_gettime.c:56:10: error: ‘ntv64.tai’ is used uninitialized in this function [-Werror=uninitialized]
56 | *ntv = valid_ntptimeval64_to_ntptimeval (ntv64);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
| |
Reviewed-by: Paul Eggert <eggert@cs.ucla.edu>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __clock_gettime internal function is not supporting 64 bit time on
architectures with __WORDSIZE == 32 and __TIMESIZE != 64 (like e.g. ARM 32
bit).
The __clock_gettime64 function shall be used instead in the glibc itself as
it supports 64 bit time on those systems.
This patch does not bring any changes to systems with __WORDSIZE == 64 as
for them the __clock_gettime64 is aliased to __clock_gettime (in
./include/time.h).
|
|
|
|
|
|
|
|
|
|
| |
Without this, these functions appear under the node Default Thread
Attributes, which is confusing.
Eventually, the documentation should be merged with the (yet to be
documented) standardized functions.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides new __ntp_gettimex64 explicit 64 bit function for getting
time parameters via NTP interface.
The call to __adjtimex in __ntp_gettime64 function has been replaced with
direct call to __clock_adjtime64 syscall, to simplify the code.
Moreover, a 32 bit version - __ntp_gettimex has been refactored to internally
use __ntp_gettimex64.
The __ntp_gettimex is now supposed to be used on systems still supporting 32
bit time (__TIMESIZE != 64) - hence the necessary conversions between struct
ntptimeval and 64 bit struct __ntptimeval64.
Build tests:
./src/scripts/build-many-glibcs.py glibcs
Run-time tests:
- Run specific tests on ARM/x86 32bit systems (qemu):
https://github.com/lmajewski/meta-y2038 and run tests:
https://github.com/lmajewski/y2038-tests/commits/master
Above tests were performed with Y2038 redirection applied as well as without to
test the proper usage of both __ntp_gettimex64 and __ntp_gettimex.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides new __ntp_gettime64 explicit 64 bit function for getting
time parameters via NTP interface.
Internally, the __clock_adjtime64 syscall is used instead of __adjtimex. This
patch is necessary for having architectures with __WORDSIZE == 32 Y2038 safe.
Moreover, a 32 bit version - __ntp_gettime has been refactored to internally
use __ntp_gettime64.
The __ntp_gettime is now supposed to be used on systems still supporting 32
bit time (__TIMESIZE != 64) - hence the necessary conversions between struct
ntptimeval and 64 bit struct __ntptimeval64.
Build tests:
./src/scripts/build-many-glibcs.py glibcs
Run-time tests:
- Run specific tests on ARM/x86 32bit systems (qemu):
https://github.com/lmajewski/meta-y2038 and run tests:
https://github.com/lmajewski/y2038-tests/commits/master
Above tests were performed with Y2038 redirection applied as well as without to
test the proper usage of both __ntp_gettime64 and __ntp_gettime.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|