public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/18] Repost of pending libpthread removal patches
@ 2021-03-12 17:48 Florian Weimer
  2021-03-12 17:48 ` [PATCH 01/18] nptl: Move pthread_mutex_consistent into libc Florian Weimer
                   ` (17 more replies)
  0 siblings, 18 replies; 36+ messages in thread
From: Florian Weimer @ 2021-03-12 17:48 UTC (permalink / raw)
  To: libc-alpha

This series is a repost of:

  <https://sourceware.org/pipermail/libc-alpha/2021-March/123202.html>

I've made some minor cleanups (removal of weak declarations of symbols
moved to libc from sysdeps/nptl/libc-lockP.h; this should help with
static linking of libpthread without crashes eventually).  I had to move
pthread_once before __pthread_unwind_next because of its _Unwind_Resume
dependency.  The patches after __pthread_unwind_next are new and remove
forwarder functionality, and also move pthread_exit.

As discussed on the GDB list, the nptl_db support for pthread_key_create
is unused by GDB, so I could not write a test for this.

Tested on i686-linux-gnu x86_64-linux-gnu.  Built with
build-many-glibcs.py.

Thanks,
Florian

Florian Weimer (18):
  nptl: Move pthread_mutex_consistent into libc
  nptl: Move __pthread_cleanup_routine into libc
  nptl: Move legacy unwinding implementation into libc
  nptl: Move legacy cancelation handling into libc as compat symbols
  nptl: Remove longjmp, siglongjmp from libpthread
  Legacy unwinder: Remove definition of _Unwind_GetCFA
  nptl: Move __pthread_cleanup_upto into libc
  nptl: Move pthread_once and __pthread_once into libc
  nptl: Move __pthread_unwind_next into libc
  csu: Move calling main out of __libc_start_main_impl
  nptl: Move internal __nptl_nthreads variable into libc
  nptl_db: Introduce DB_MAIN_ARRAY_VARIABLE
  nptl: Move __pthread_keys global variable into libc
  nptl: Move __nptl_deallocate_tsd into libc
  nptl: Move pthread_exit into libc
  nptl: Move pthread_setcancelstate into libc
  nptl: Move pthread_setcanceltype into libc
  nptl: Invoke the set_robust_list system call directly in fork

 NEWS                                          |   4 +-
 csu/libc-start.c                              |  74 +-----------
 elf/Makefile                                  |   2 +
 include/setjmp.h                              |   4 +-
 libio/iopopen.c                               |   5 +-
 misc/error.c                                  |  19 +--
 nptl/Makefile                                 |  48 +++++---
 nptl/Versions                                 |  48 +++++---
 nptl/cleanup_compat.c                         |  16 ++-
 nptl/cleanup_defer_compat.c                   |  72 +++--------
 nptl/cleanup_routine.c                        |  12 +-
 nptl/forward.c                                |  28 -----
 nptl/libc-cleanup.c                           |  64 +++++++++-
 nptl/libc_pthread_init.c                      |   9 +-
 nptl/nptl-init.c                              |  34 +-----
 nptl/nptl_deallocate_tsd.c                    | 112 ++++++++++++++++++
 .../nptl_nthreads.c                           |  19 +--
 nptl/pt-longjmp.c                             |  49 --------
 nptl/pthreadP.h                               |  48 ++++----
 nptl/pthread_cancel.c                         |  10 +-
 nptl/{pt-cleanup.c => pthread_cleanup_upto.c} |   2 +-
 nptl/pthread_create.c                         |  98 ---------------
 nptl/pthread_exit.c                           |  16 ++-
 nptl/pthread_keys.c                           |  24 ++++
 nptl/pthread_mutex_consistent.c               |  22 +++-
 nptl/pthread_once.c                           |  22 +++-
 nptl/pthread_setcancelstate.c                 |   6 +-
 nptl/pthread_setcanceltype.c                  |   3 +-
 nptl/tst-cleanup4.c                           |   5 +
 nptl/tst-cleanup4aux.c                        |   5 +
 nptl/tst-pthread_exit-nothreads-static.c      |  19 +++
 nptl/tst-pthread_exit-nothreads.c             |  28 +++++
 nptl/unwind.c                                 |  14 ++-
 nptl/vars.c                                   |   5 -
 nptl_db/db-symbols.awk                        |   1 +
 nptl_db/structs.def                           |   9 +-
 setjmp/Versions                               |   4 -
 stdlib/fmtmsg.c                               |   9 +-
 sysdeps/arm/Makefile                          |   5 -
 sysdeps/arm/nptl/unwind-forcedunwind.c        |  25 ----
 sysdeps/generic/libc_start_call_main.h        |  24 ++++
 sysdeps/generic/unwind-dw2.c                  |   8 --
 sysdeps/generic/unwind-resume.c               |  14 +++
 .../unwind-resume.c}                          |   5 +-
 sysdeps/nptl/fork.c                           |  14 +--
 sysdeps/nptl/fork.h                           |   3 -
 sysdeps/nptl/jmp-unwind.c                     |   8 +-
 sysdeps/nptl/libc-lock.h                      |  59 ++++-----
 sysdeps/nptl/libc-lockP.h                     |  45 +------
 sysdeps/nptl/libc_start_call_main.h           |  74 ++++++++++++
 sysdeps/nptl/pthread-functions.h              |  15 ---
 sysdeps/nptl/pthread.h                        |   5 +-
 sysdeps/nptl/unwind-forcedunwind.c            |  64 ----------
 sysdeps/posix/system.c                        |   5 +-
 sysdeps/pthread/Makefile                      |   2 +-
 sysdeps/pthread/tst-robust1.c                 |   4 +-
 sysdeps/pthread/tst-robust8.c                 |   2 +-
 sysdeps/pthread/tst-robust9.c                 |   4 +-
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  15 +++
 .../sysv/linux/aarch64/libpthread.abilist     |  15 ---
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |  15 +++
 .../unix/sysv/linux/alpha/libpthread.abilist  |  15 ---
 sysdeps/unix/sysv/linux/arc/libc.abilist      |  15 +++
 .../unix/sysv/linux/arc/libpthread.abilist    |  13 --
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  15 +++
 .../unix/sysv/linux/arm/be/libpthread.abilist |  15 ---
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  15 +++
 .../unix/sysv/linux/arm/le/libpthread.abilist |  15 ---
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  15 +++
 .../unix/sysv/linux/csky/libpthread.abilist   |  13 --
 sysdeps/unix/sysv/linux/fatal-prepare.h       |   4 +-
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  15 +++
 .../unix/sysv/linux/hppa/libpthread.abilist   |  15 ---
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  15 +++
 .../unix/sysv/linux/i386/libpthread.abilist   |  15 ---
 sysdeps/unix/sysv/linux/ia64/Makefile         |   2 +-
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |  15 +++
 .../unix/sysv/linux/ia64/libpthread.abilist   |  15 ---
 .../sysv/linux/m68k/coldfire/libc.abilist     |  15 +++
 .../linux/m68k/coldfire/libpthread.abilist    |  15 ---
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  15 +++
 .../sysv/linux/m68k/m680x0/libpthread.abilist |  15 ---
 .../sysv/linux/microblaze/be/libc.abilist     |  15 +++
 .../linux/microblaze/be/libpthread.abilist    |  15 ---
 .../sysv/linux/microblaze/le/libc.abilist     |  15 +++
 .../linux/microblaze/le/libpthread.abilist    |  15 ---
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  15 +++
 .../sysv/linux/mips/mips32/libpthread.abilist |  15 ---
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  15 +++
 .../sysv/linux/mips/mips64/libpthread.abilist |  15 ---
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  15 +++
 .../sysv/linux/mips/mips64/n64/libc.abilist   |  15 +++
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |  15 +++
 .../unix/sysv/linux/nios2/libpthread.abilist  |  15 ---
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  15 +++
 .../powerpc/powerpc32/libpthread.abilist      |  17 ---
 .../powerpc/powerpc32/nofpu/libc.abilist      |  15 +++
 .../linux/powerpc/powerpc64/be/libc.abilist   |  15 +++
 .../powerpc/powerpc64/be/libpthread.abilist   |  17 ---
 .../linux/powerpc/powerpc64/le/libc.abilist   |  15 +++
 .../powerpc/powerpc64/le/libpthread.abilist   |  15 ---
 sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c  |  61 ----------
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |  15 +++
 .../sysv/linux/riscv/rv32/libpthread.abilist  |  13 --
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |  15 +++
 .../sysv/linux/riscv/rv64/libpthread.abilist  |  13 --
 sysdeps/unix/sysv/linux/s390/Versions         |   2 +-
 sysdeps/unix/sysv/linux/s390/jmp-unwind.c     |   7 +-
 .../unix/sysv/linux/s390/libpthread-compat.c  |  25 ++++
 sysdeps/unix/sysv/linux/s390/pt-longjmp.c     |  33 ------
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  15 +++
 .../linux/s390/s390-32/libpthread.abilist     |  18 +--
 .../unix/sysv/linux/s390/s390-64/libc.abilist |  15 +++
 .../linux/s390/s390-64/libpthread.abilist     |  18 +--
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  15 +++
 .../unix/sysv/linux/sh/be/libpthread.abilist  |  15 ---
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  15 +++
 .../unix/sysv/linux/sh/le/libpthread.abilist  |  15 ---
 .../sysv/linux/sparc/sparc32/libc.abilist     |  15 +++
 .../linux/sparc/sparc32/libpthread.abilist    |  15 ---
 .../sysv/linux/sparc/sparc64/libc.abilist     |  15 +++
 .../linux/sparc/sparc64/libpthread.abilist    |  15 ---
 sysdeps/unix/sysv/linux/spawni.c              |   5 +-
 .../unix/sysv/linux/x86_64/64/libc.abilist    |  15 +++
 .../sysv/linux/x86_64/64/libpthread.abilist   |  15 ---
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |  15 +++
 .../sysv/linux/x86_64/x32/libpthread.abilist  |  15 ---
 sysdeps/x86/nptl/pt-longjmp.c                 |  71 -----------
 128 files changed, 1169 insertions(+), 1312 deletions(-)
 create mode 100644 nptl/nptl_deallocate_tsd.c
 rename sysdeps/arm/pt-arm-unwind-resume.S => nptl/nptl_nthreads.c (51%)
 delete mode 100644 nptl/pt-longjmp.c
 rename nptl/{pt-cleanup.c => pthread_cleanup_upto.c} (98%)
 create mode 100644 nptl/pthread_keys.c
 create mode 100644 nptl/tst-pthread_exit-nothreads-static.c
 create mode 100644 nptl/tst-pthread_exit-nothreads.c
 delete mode 100644 sysdeps/arm/nptl/unwind-forcedunwind.c
 create mode 100644 sysdeps/generic/libc_start_call_main.h
 rename sysdeps/{unix/sysv/linux/ia64/unwind-forcedunwind.c => ia64/unwind-resume.c} (87%)
 create mode 100644 sysdeps/nptl/libc_start_call_main.h
 delete mode 100644 sysdeps/nptl/unwind-forcedunwind.c
 delete mode 100644 sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c
 create mode 100644 sysdeps/unix/sysv/linux/s390/libpthread-compat.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/pt-longjmp.c
 delete mode 100644 sysdeps/x86/nptl/pt-longjmp.c

-- 
2.29.2


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2021-03-16 18:14 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 17:48 [PATCH 00/18] Repost of pending libpthread removal patches Florian Weimer
2021-03-12 17:48 ` [PATCH 01/18] nptl: Move pthread_mutex_consistent into libc Florian Weimer
2021-03-15 19:30   ` Adhemerval Zanella
2021-03-16  5:42     ` Florian Weimer
2021-03-16 13:49       ` Adhemerval Zanella
2021-03-16 13:53         ` Florian Weimer
2021-03-16 14:07           ` Adhemerval Zanella
2021-03-12 17:49 ` [PATCH 02/18] nptl: Move __pthread_cleanup_routine " Florian Weimer
2021-03-15 19:53   ` Adhemerval Zanella
2021-03-16  7:09     ` Florian Weimer
2021-03-12 17:49 ` [PATCH 03/18] nptl: Move legacy unwinding implementation " Florian Weimer
2021-03-15 20:02   ` Adhemerval Zanella
2021-03-16  7:03     ` Florian Weimer
2021-03-12 17:49 ` [PATCH 04/18] nptl: Move legacy cancelation handling into libc as compat symbols Florian Weimer
2021-03-16 14:09   ` Adhemerval Zanella
2021-03-16 14:45     ` Florian Weimer
2021-03-16 18:14       ` Adhemerval Zanella
2021-03-12 17:49 ` [PATCH 05/18] nptl: Remove longjmp, siglongjmp from libpthread Florian Weimer
2021-03-16 14:13   ` Adhemerval Zanella
2021-03-16 14:39     ` Florian Weimer
2021-03-12 17:49 ` [PATCH 06/18] Legacy unwinder: Remove definition of _Unwind_GetCFA Florian Weimer
2021-03-16 14:14   ` Adhemerval Zanella
2021-03-12 17:49 ` [PATCH 07/18] nptl: Move __pthread_cleanup_upto into libc Florian Weimer
2021-03-16 14:35   ` Adhemerval Zanella
2021-03-12 17:49 ` [PATCH 08/18] nptl: Move pthread_once and __pthread_once " Florian Weimer
2021-03-15 19:24   ` Florian Weimer
2021-03-12 17:49 ` [PATCH 09/18] nptl: Move __pthread_unwind_next " Florian Weimer
2021-03-12 17:49 ` [PATCH 10/18] csu: Move calling main out of __libc_start_main_impl Florian Weimer
2021-03-12 17:49 ` [PATCH 11/18] nptl: Move internal __nptl_nthreads variable into libc Florian Weimer
2021-03-12 17:49 ` [PATCH 12/18] nptl_db: Introduce DB_MAIN_ARRAY_VARIABLE Florian Weimer
2021-03-12 17:50 ` [PATCH 13/18] nptl: Move __pthread_keys global variable into libc Florian Weimer
2021-03-12 17:50 ` [PATCH 14/18] nptl: Move __nptl_deallocate_tsd " Florian Weimer
2021-03-12 17:50 ` [PATCH 15/18] nptl: Move pthread_exit " Florian Weimer
2021-03-12 17:50 ` [PATCH 16/18] nptl: Move pthread_setcancelstate " Florian Weimer
2021-03-12 17:50 ` [PATCH 17/18] nptl: Move pthread_setcanceltype " Florian Weimer
2021-03-12 17:50 ` [PATCH 18/18] nptl: Invoke the set_robust_list system call directly in fork Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).