about summary refs log tree commit diff
path: root/htl/pt-internal.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-011-1/+1
|
* Fix all the remaining misspellings -- BZ 25337Paul Pluzhnikov2023-06-021-1/+1
|
* htl: move __pthtread_total into libcGuy-Fleury Iteriteka2023-04-051-0/+1
| | | | | | | | | | | htl/pt-nthreads.c: new file. htl/Makefile: Add it to routine. htl/Versions: version it as private libc symbol. htl/pt-create.c: remove his definition here. htl/pt-internal.h: add propertie to it declaration. Signed-off-by: Guy-Fleury Iteriteka <gfleury@disroot.org> Message-Id: <20230318095826.1125734-2-gfleury@disroot.org>
* Fix typos in commentsSamuel Thibault2023-02-121-1/+1
|
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* htl: Fix cleaning the reply portSamuel Thibault2022-01-221-5/+11
| | | | | | | | | | | | | If any RPC fails, the reply port will already be deallocated. __pthread_thread_terminate thus has to defer taking its name until the very last __thread_terminate_release which doesn't reply a message. But then we have to read from the pthread structure. This introduces __pthread_dealloc_finish() which does the recording of the thread termination, so the slot can be reused really only just before the __thread_terminate_release call. Only the real thread can set it, so let's decouple this from the pthread_state by just removing the PTHREAD_TERMINATED state and add a terminated field.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* htl: Move thread table to ld.soSergey Bugaev2021-09-161-16/+7
| | | | | | | | | | | The next commit is going to introduce a new implementation of THREAD_GSCOPE_WAIT which needs to access the list of threads. Since it must be usable from the dynamic laoder, we have to move the symbols for the list of threads into the loader. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20210915171110.226187-2-bugaevc@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* htl: Add pshared semaphore supportSamuel Thibault2020-12-161-0/+33
| | | | | | The implementation is extremely similar to the nptl implementation, but with slight differences in the futex interface. This fixes some of BZ 25521.
* htl: Keep thread signals blocked during its initializationSamuel Thibault2020-11-111-0/+3
| | | | | One may send signals immediately after creating a thread. We need to block them until the thread is ready to run signal handlers.
* htl: Move cleanup stack to variable shared between libc and pthreadSamuel Thibault2020-06-141-1/+3
| | | | | | | | | | | | | | | | | | | | If libpthread gets loaded dynamically, the stack needs to already contain the cleanup handlers of the main thread. * htl/libc_pthread_init.c (__pthread_cleanup_stack): New per-thread variable. * htl/Versions (libc): Add __pthread_cleanup_stack as private symbol. * htl/pt-internal.h (struct __pthread): Remove cancelation_handlers field. (__pthread_cleanup_stack): Add variable declaration. * htl/pt-alloc.c (initialize_pthread): Remove initialization of cancelation_handlers field. * htl/pt-cleanup.c (__pthread_get_cleanup_stack): Return the address of __pthread_cleanup_stack instead of that of the cancelation_handlers field. * htl/forward.c: Include <pt-internal.h>. (dummy_list): Remove variable. (__pthread_get_cleanup_stack): Return the address of __pthread_cleanup_stack instead of that of dummy_list.
* htl: Make sem_wait/sem_timedwait interruptibleSamuel Thibault2020-02-101-0/+8
|
* htl: Report missing mutex lock on pthread_cond_*waitSamuel Thibault2020-02-091-0/+3
|
* htl: Fix default guard sizeSamuel Thibault2020-02-091-1/+1
| | | | | When it is not hardcoded by the architecture with PAGESIZE, we need to use the dynamic values from __vm_page_size.
* htl: Add support for C11 threads behaviorSamuel Thibault2020-02-091-0/+3
| | | | | | | Essentially properly calling the thread function which returns an int instead of a void*. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* htl: Remove unused filesSamuel Thibault2020-02-091-3/+0
| | | | These have never been used.
* htl: Avoid crashing when passed invalid pthread_t valuesSamuel Thibault2020-01-131-2/+4
|
* htl: Drop common tcbhead_t definitionSamuel Thibault2020-01-041-10/+2
| | | | | This would conflict when including pt-internal.h outside libpthread, while we can actually just include <tls.h>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* hurd: Bump remaining LGPL2+ htl licences to LGPL 2.1+Samuel Thibault2018-04-021-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * htl/Makefile: Bump licence to LGPL 2.1+. * htl/alloca_cutoff.c: Likewise. * htl/cthreads-compat.c: Likewise. * htl/lockfile.c: Likewise. * htl/pt-alloc.c: Likewise. * htl/pt-cancel.c: Likewise. * htl/pt-cleanup.c: Likewise. * htl/pt-create.c: Likewise. * htl/pt-dealloc.c: Likewise. * htl/pt-detach.c: Likewise. * htl/pt-exit.c: Likewise. * htl/pt-getattr.c: Likewise. * htl/pt-initialize.c: Likewise. * htl/pt-internal.h: Likewise. * htl/pt-join.c: Likewise. * htl/pt-self.c: Likewise. * htl/pt-setcancelstate.c: Likewise. * htl/pt-setcanceltype.c: Likewise. * htl/pt-sigmask.c: Likewise. * htl/pt-spin-inlines.c: Likewise. * htl/pt-testcancel.c: Likewise. * htl/pt-yield.c: Likewise. * htl/tests/test-1.c: Likewise. * htl/tests/test-10.c: Likewise. * htl/tests/test-11.c: Likewise. * htl/tests/test-12.c: Likewise. * htl/tests/test-13.c: Likewise. * htl/tests/test-14.c: Likewise. * htl/tests/test-15.c: Likewise. * htl/tests/test-16.c: Likewise. * htl/tests/test-17.c: Likewise. * htl/tests/test-2.c: Likewise. * htl/tests/test-3.c: Likewise. * htl/tests/test-4.c: Likewise. * htl/tests/test-5.c: Likewise. * htl/tests/test-6.c: Likewise. * htl/tests/test-7.c: Likewise. * htl/tests/test-8.c: Likewise. * htl/tests/test-9.c: Likewise. * htl/tests/test-__pthread_destroy_specific-skip.c: Likewise. * sysdeps/htl/bits/cancelation.h: Likewise. * sysdeps/htl/bits/pthread-np.h: Likewise. * sysdeps/htl/bits/pthread.h: Likewise. * sysdeps/htl/bits/pthreadtypes.h: Likewise. * sysdeps/htl/bits/semaphore.h: Likewise. * sysdeps/htl/bits/types/__pthread_key.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_attr.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_barrier.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_barrierattr.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_cond.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_condattr.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_mutex.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_mutexattr.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_once.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_rwlock.h: Likewise. * sysdeps/htl/bits/types/struct___pthread_rwlockattr.h: Likewise. * sysdeps/htl/old_pt-atfork.c: Likewise. * sysdeps/htl/pt-atfork.c: Likewise. * sysdeps/htl/pt-attr-destroy.c: Likewise. * sysdeps/htl/pt-attr-getdetachstate.c: Likewise. * sysdeps/htl/pt-attr-getguardsize.c: Likewise. * sysdeps/htl/pt-attr-getinheritsched.c: Likewise. * sysdeps/htl/pt-attr-getschedparam.c: Likewise. * sysdeps/htl/pt-attr-getschedpolicy.c: Likewise. * sysdeps/htl/pt-attr-getscope.c: Likewise. * sysdeps/htl/pt-attr-getstack.c: Likewise. * sysdeps/htl/pt-attr-getstackaddr.c: Likewise. * sysdeps/htl/pt-attr-getstacksize.c: Likewise. * sysdeps/htl/pt-attr-init.c: Likewise. * sysdeps/htl/pt-attr-setdetachstate.c: Likewise. * sysdeps/htl/pt-attr-setguardsize.c: Likewise. * sysdeps/htl/pt-attr-setinheritsched.c: Likewise. * sysdeps/htl/pt-attr-setschedparam.c: Likewise. * sysdeps/htl/pt-attr-setschedpolicy.c: Likewise. * sysdeps/htl/pt-attr-setscope.c: Likewise. * sysdeps/htl/pt-attr-setstack.c: Likewise. * sysdeps/htl/pt-attr-setstackaddr.c: Likewise. * sysdeps/htl/pt-attr-setstacksize.c: Likewise. * sysdeps/htl/pt-attr.c: Likewise. * sysdeps/htl/pt-barrier-destroy.c: Likewise. * sysdeps/htl/pt-barrier-init.c: Likewise. * sysdeps/htl/pt-barrier-wait.c: Likewise. * sysdeps/htl/pt-barrier.c: Likewise. * sysdeps/htl/pt-barrierattr-destroy.c: Likewise. * sysdeps/htl/pt-barrierattr-getpshared.c: Likewise. * sysdeps/htl/pt-barrierattr-init.c: Likewise. * sysdeps/htl/pt-barrierattr-setpshared.c: Likewise. * sysdeps/htl/pt-cond-brdcast.c: Likewise. * sysdeps/htl/pt-cond-destroy.c: Likewise. * sysdeps/htl/pt-cond-init.c: Likewise. * sysdeps/htl/pt-cond-signal.c: Likewise. * sysdeps/htl/pt-cond-timedwait.c: Likewise. * sysdeps/htl/pt-cond-wait.c: Likewise. * sysdeps/htl/pt-cond.c: Likewise. * sysdeps/htl/pt-condattr-destroy.c: Likewise. * sysdeps/htl/pt-condattr-getclock.c: Likewise. * sysdeps/htl/pt-condattr-getpshared.c: Likewise. * sysdeps/htl/pt-condattr-init.c: Likewise. * sysdeps/htl/pt-condattr-setclock.c: Likewise. * sysdeps/htl/pt-condattr-setpshared.c: Likewise. * sysdeps/htl/pt-destroy-specific.c: Likewise. * sysdeps/htl/pt-equal.c: Likewise. * sysdeps/htl/pt-getconcurrency.c: Likewise. * sysdeps/htl/pt-getcpuclockid.c: Likewise. * sysdeps/htl/pt-getschedparam.c: Likewise. * sysdeps/htl/pt-getspecific.c: Likewise. * sysdeps/htl/pt-init-specific.c: Likewise. * sysdeps/htl/pt-key-create.c: Likewise. * sysdeps/htl/pt-key-delete.c: Likewise. * sysdeps/htl/pt-key.h: Likewise. * sysdeps/htl/pt-mutex-destroy.c: Likewise. * sysdeps/htl/pt-mutex-getprioceiling.c: Likewise. * sysdeps/htl/pt-mutex-init.c: Likewise. * sysdeps/htl/pt-mutex-lock.c: Likewise. * sysdeps/htl/pt-mutex-setprioceiling.c: Likewise. * sysdeps/htl/pt-mutex-timedlock.c: Likewise. * sysdeps/htl/pt-mutex-trylock.c: Likewise. * sysdeps/htl/pt-mutex-unlock.c: Likewise. * sysdeps/htl/pt-mutexattr-destroy.c: Likewise. * sysdeps/htl/pt-mutexattr-getprioceiling.c: Likewise. * sysdeps/htl/pt-mutexattr-getprotocol.c: Likewise. * sysdeps/htl/pt-mutexattr-getpshared.c: Likewise. * sysdeps/htl/pt-mutexattr-gettype.c: Likewise. * sysdeps/htl/pt-mutexattr-init.c: Likewise. * sysdeps/htl/pt-mutexattr-setprioceiling.c: Likewise. * sysdeps/htl/pt-mutexattr-setprotocol.c: Likewise. * sysdeps/htl/pt-mutexattr-setpshared.c: Likewise. * sysdeps/htl/pt-mutexattr-settype.c: Likewise. * sysdeps/htl/pt-mutexattr.c: Likewise. * sysdeps/htl/pt-once.c: Likewise. * sysdeps/htl/pt-rwlock-attr.c: Likewise. * sysdeps/htl/pt-rwlock-destroy.c: Likewise. * sysdeps/htl/pt-rwlock-init.c: Likewise. * sysdeps/htl/pt-rwlock-rdlock.c: Likewise. * sysdeps/htl/pt-rwlock-timedrdlock.c: Likewise. * sysdeps/htl/pt-rwlock-timedwrlock.c: Likewise. * sysdeps/htl/pt-rwlock-tryrdlock.c: Likewise. * sysdeps/htl/pt-rwlock-trywrlock.c: Likewise. * sysdeps/htl/pt-rwlock-unlock.c: Likewise. * sysdeps/htl/pt-rwlock-wrlock.c: Likewise. * sysdeps/htl/pt-rwlockattr-destroy.c: Likewise. * sysdeps/htl/pt-rwlockattr-getpshared.c: Likewise. * sysdeps/htl/pt-rwlockattr-init.c: Likewise. * sysdeps/htl/pt-rwlockattr-setpshared.c: Likewise. * sysdeps/htl/pt-setconcurrency.c: Likewise. * sysdeps/htl/pt-setschedparam.c: Likewise. * sysdeps/htl/pt-setschedprio.c: Likewise. * sysdeps/htl/pt-setspecific.c: Likewise. * sysdeps/htl/pt-spin.c: Likewise. * sysdeps/htl/pt-startup.c: Likewise. * sysdeps/htl/pthread.h: Likewise. * sysdeps/htl/sem-close.c: Likewise. * sysdeps/htl/sem-destroy.c: Likewise. * sysdeps/htl/sem-getvalue.c: Likewise. * sysdeps/htl/sem-init.c: Likewise. * sysdeps/htl/sem-open.c: Likewise. * sysdeps/htl/sem-post.c: Likewise. * sysdeps/htl/sem-timedwait.c: Likewise. * sysdeps/htl/sem-trywait.c: Likewise. * sysdeps/htl/sem-unlink.c: Likewise. * sysdeps/htl/sem-wait.c: Likewise. * sysdeps/hurd/htl/pt-kill.c: Likewise. * sysdeps/i386/htl/pt-machdep.h: Likewise. * sysdeps/mach/htl/pt-block.c: Likewise. * sysdeps/mach/htl/pt-spin.c: Likewise. * sysdeps/mach/htl/pt-stack-alloc.c: Likewise. * sysdeps/mach/htl/pt-thread-alloc.c: Likewise. * sysdeps/mach/htl/pt-thread-start.c: Likewise. * sysdeps/mach/htl/pt-thread-terminate.c: Likewise. * sysdeps/mach/htl/pt-timedblock.c: Likewise. * sysdeps/mach/htl/pt-wakeup.c: Likewise. * sysdeps/mach/hurd/htl/bits/pthread-np.h: Likewise. * sysdeps/mach/hurd/htl/bits/types/struct___pthread_mutex.h: Likewise. * sysdeps/mach/hurd/htl/pt-attr-setstackaddr.c: Likewise. * sysdeps/mach/hurd/htl/pt-attr-setstacksize.c: Likewise. * sysdeps/mach/hurd/htl/pt-docancel.c: Likewise. * sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c: Likewise. * sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-consistent.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-destroy.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-init.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-lock.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-timedlock.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-trylock.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex-unlock.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutex.h: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-destroy.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-getprioceiling.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-getprotocol.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-getpshared.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-gettype.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-init.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-setprioceiling.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-setpshared.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c: Likewise. * sysdeps/mach/hurd/htl/pt-mutexattr-settype.c: Likewise. * sysdeps/mach/hurd/htl/pt-sigstate-destroy.c: Likewise. * sysdeps/mach/hurd/htl/pt-sigstate-init.c: Likewise. * sysdeps/mach/hurd/htl/pt-sigstate.c: Likewise. * sysdeps/mach/hurd/htl/pt-sysdep.c: Likewise. * sysdeps/mach/hurd/htl/pt-sysdep.h: Likewise. * sysdeps/mach/hurd/i386/htl/pt-machdep.c: Likewise. * sysdeps/mach/hurd/i386/htl/pt-setup.c: Likewise.
* hurd: Add hurd thread librarySamuel Thibault2018-04-021-0/+324
Contributed by Agustina Arzille <avarzille@riseup.net> Amos Jeffries <squid3@treenet.co.nz> David Michael <fedora.dm0@gmail.com> Marco Gerards <marco@gnu.org> Marcus Brinkmann <marcus@gnu.org> Neal H. Walfield <neal@gnu.org> Pino Toscano <toscano.pino@tiscali.it> Richard Braun <rbraun@sceen.net> Roland McGrath <roland@gnu.org> Samuel Thibault <samuel.thibault@ens-lyon.org> Thomas DiModica <ricinwich@yahoo.com> Thomas Schwinge <tschwinge@gnu.org> * htl: New directory. * sysdeps/htl: New directory. * sysdeps/hurd/htl: New directory. * sysdeps/i386/htl: New directory. * sysdeps/mach/htl: New directory. * sysdeps/mach/hurd/htl: New directory. * sysdeps/mach/hurd/i386/htl: New directory. * nscd/Depend, resolv/Depend, rt/Depend: Add htl dependency. * sysdeps/mach/hurd/i386/Implies: Add mach/hurd/i386/htl imply. * sysdeps/mach/hurd/i386/libpthread.abilist: New file.