This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v3 0/6] Add support for ISO C11 threads.h


This is a new update of C11 thread support based on version 2 from 
Juan Manuel Torres Palma [1].  I contact him to take over his initial
patches and extended to fix some issues and update to glibc 2.26.

The main changes are:

  - Addresses Joseph's comments from [2] and ad indicated in
    in C11 thread patch I based this implementation from th
    public C11 thread document I have access [3]. I would ask for
    suggestion and change if it deviates from the final standard
    definition.

  - Fix remaining namespace and linkspace issues by building on
    basically all supported architectures (aarch64, alpha, armhf,
    hppa, i686, ia64, m68k, microblaze, mips64, mips64n32, mips,
    nios2, powerpc64le, powerpc64, powerpc, powerpc-power4, s390,
    s390x, sh4, sparc64, sparcv9, tilegx, tilegx32, tilepro,
    x86_64, and x86_64-32).  Note: hppa changes still results in
    broken build as indicated in BZ#21016.

  - Adjusted abi files to 2.26, headers dates to 2017 and some
    others typos.

  - Fix a calling convention on pthread_create to call c11 start
    function with a well-behaved semanthics.

I tested this without regression with a full make/check on
x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
powerpc-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf,
sparc64-linux-gnu, and sparcv9-linux-gnu.

[1] https://sourceware.org/ml/libc-alpha/2015-08/msg01051.html
[2] https://sourceware.org/ml/libc-alpha/2016-03/msg00604.html
[3] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

Adhemerval Zanella (5):
  Consolidate pthreadtype.h placement
  Move mutex and condition variable definition to common header
  Clean pthread functions namespaces for C11 threads
  Add C11 threads support
  Add test cases for ISO C11 threads

Juan Manuel Torres Palma (1):
  Add manual documentation for threads.h

 ChangeLog                                          | 247 ++++++++++++++
 bits/thread-shared-types.h                         |  36 ++
 conform/Makefile                                   |   7 +-
 conform/data/threads.h-data                        |  56 ++++
 include/sched.h                                    |   2 +
 include/stdc-predef.h                              |   3 -
 include/sys/mman.h                                 |   4 +
 include/termios.h                                  |   2 +
 include/time.h                                     |   2 +-
 manual/Makefile                                    |   2 +-
 manual/isothreads.texi                             | 373 +++++++++++++++++++++
 misc/Versions                                      |   2 +
 nptl/Makefile                                      |  17 +-
 nptl/Versions                                      |  16 +
 nptl/allocatestack.c                               |  24 +-
 nptl/call_once.c                                   |  27 ++
 nptl/cnd_broadcast.c                               |  28 ++
 nptl/cnd_destroy.c                                 |  28 ++
 nptl/cnd_init.c                                    |  27 ++
 nptl/cnd_signal.c                                  |  28 ++
 nptl/cnd_timedwait.c                               |  32 ++
 nptl/cnd_wait.c                                    |  28 ++
 nptl/descr.h                                       |   1 +
 nptl/mtx_destroy.c                                 |  27 ++
 nptl/mtx_init.c                                    |  48 +++
 nptl/mtx_lock.c                                    |  29 ++
 nptl/mtx_timedlock.c                               |  31 ++
 nptl/mtx_trylock.c                                 |  29 ++
 nptl/mtx_unlock.c                                  |  28 ++
 nptl/pthreadP.h                                    |  12 +
 nptl/pthread_cancel.c                              |   7 +-
 nptl/pthread_create.c                              |  39 ++-
 nptl/pthread_detach.c                              |   3 +-
 nptl/pthread_equal.c                               |   2 +-
 nptl/pthread_exit.c                                |   4 +-
 nptl/pthread_getspecific.c                         |   2 +-
 nptl/pthread_join.c                                |   3 +-
 nptl/pthread_key_create.c                          |   2 +-
 nptl/pthread_key_delete.c                          |   3 +-
 nptl/pthread_mutex_destroy.c                       |   2 +-
 nptl/pthread_mutex_init.c                          |   2 +-
 nptl/pthread_mutex_lock.c                          |   2 +-
 nptl/pthread_mutex_timedlock.c                     |   5 +-
 nptl/pthread_mutex_trylock.c                       |   3 +-
 nptl/pthread_mutex_unlock.c                        |   2 +-
 nptl/pthread_mutexattr_init.c                      |   3 +-
 nptl/pthread_mutexattr_settype.c                   |   3 +-
 nptl/pthread_self.c                                |   2 +-
 nptl/pthread_setspecific.c                         |   2 +-
 nptl/thrd_create.c                                 |  30 ++
 nptl/thrd_current.c                                |  26 ++
 nptl/thrd_detach.c                                 |  30 ++
 nptl/thrd_equal.c                                  |  26 ++
 nptl/thrd_exit.c                                   |  27 ++
 nptl/thrd_join.c                                   |  32 ++
 nptl/thrd_priv.h                                   |  46 +++
 nptl/thrd_sleep.c                                  |  41 +++
 nptl/thrd_yield.c                                  |  29 ++
 nptl/tpp.c                                         |   4 +-
 nptl/tss_create.c                                  |  29 ++
 nptl/tss_delete.c                                  |  27 ++
 nptl/tss_get.c                                     |  27 ++
 nptl/tss_set.c                                     |  28 ++
 nptl/tst-call-once.c                               |  66 ++++
 nptl/tst-cnd-basic.c                               |  68 ++++
 nptl/tst-cnd-broadcast.c                           |  83 +++++
 nptl/tst-cnd-timedwait.c                           |  70 ++++
 nptl/tst-mtx-basic.c                               |  73 ++++
 nptl/tst-mtx-recursive.c                           |  45 +++
 nptl/tst-mtx-timedlock.c                           |  98 ++++++
 nptl/tst-mtx-trylock.c                             |  90 +++++
 nptl/tst-thrd-detach.c                             |  52 +++
 nptl/tst-thrd-sleep.c                              |  51 +++
 nptl/tst-tss-basic.c                               |  75 +++++
 posix/Makefile                                     |   3 +-
 posix/nanosleep.c                                  |   2 +-
 sysdeps/aarch64/nptl/bits/pthreadtypes.h           |  67 +---
 sysdeps/aarch64/nptl/bits/thread-shared-types.h    |  97 ++++++
 .../linux/alpha => alpha/nptl}/bits/pthreadtypes.h |  63 +---
 sysdeps/alpha/nptl/bits/thread-shared-types.h      |  93 +++++
 sysdeps/arm/nptl/bits/pthreadtypes.h               |  67 +---
 sysdeps/arm/nptl/bits/thread-shared-types.h        |  95 ++++++
 sysdeps/hppa/nptl/bits/pthreadtypes.h              |  83 +----
 sysdeps/hppa/nptl/bits/thread-shared-types.h       | 105 ++++++
 sysdeps/i386/nptl/tls.h                            |   2 +-
 sysdeps/ia64/nptl/bits/pthreadtypes.h              |  67 +---
 sysdeps/ia64/nptl/bits/thread-shared-types.h       |  95 ++++++
 sysdeps/m68k/nptl/bits/pthreadtypes.h              |  68 +---
 sysdeps/m68k/nptl/bits/thread-shared-types.h       | 100 ++++++
 sysdeps/microblaze/nptl/bits/pthreadtypes.h        |  61 +---
 sysdeps/microblaze/nptl/bits/thread-shared-types.h |  96 ++++++
 sysdeps/mips/nptl/bits/pthreadtypes.h              |  83 +----
 sysdeps/mips/nptl/bits/thread-shared-types.h       | 117 +++++++
 sysdeps/nacl/libpthread.abilist                    |  26 ++
 sysdeps/nios2/nptl/bits/pthreadtypes.h             |  67 +---
 sysdeps/nios2/nptl/bits/thread-shared-types.h      |  93 +++++
 sysdeps/nptl/bits/pthreadtypes-common.h            |  44 +++
 sysdeps/nptl/threads.h                             | 198 +++++++++++
 sysdeps/posix/gethostname.c                        |   2 +-
 .../powerpc => powerpc/nptl}/bits/pthreadtypes.h   | 100 +-----
 sysdeps/powerpc/nptl/bits/thread-shared-types.h    | 121 +++++++
 sysdeps/s390/nptl/bits/pthreadtypes.h              | 103 +-----
 sysdeps/s390/nptl/bits/thread-shared-types.h       | 140 ++++++++
 sysdeps/sh/nptl/bits/pthreadtypes.h                |  63 +---
 sysdeps/sh/nptl/bits/thread-shared-types.h         |  98 ++++++
 sysdeps/sparc/nptl/bits/pthreadtypes.h             |  82 +----
 sysdeps/sparc/nptl/bits/thread-shared-types.h      | 119 +++++++
 sysdeps/tile/nptl/bits/pthreadtypes.h              |  95 +-----
 sysdeps/tile/nptl/bits/thread-shared-types.h       | 118 +++++++
 sysdeps/unix/sysv/linux/aarch64/libpthread.abilist |  26 ++
 sysdeps/unix/sysv/linux/aarch64/mmap.c             |   5 +-
 sysdeps/unix/sysv/linux/alpha/libpthread.abilist   |  26 ++
 sysdeps/unix/sysv/linux/arm/libpthread.abilist     |  26 ++
 sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c |   5 +-
 sysdeps/unix/sysv/linux/hppa/libpthread.abilist    |  26 ++
 sysdeps/unix/sysv/linux/hppa/mmap.c                |   1 +
 sysdeps/unix/sysv/linux/i386/Versions              |   2 +-
 sysdeps/unix/sysv/linux/i386/libpthread.abilist    |  26 ++
 sysdeps/unix/sysv/linux/i386/mmap.c                |   1 +
 sysdeps/unix/sysv/linux/i386/smp.h                 |   2 +-
 sysdeps/unix/sysv/linux/ia64/libpthread.abilist    |  26 ++
 .../sysv/linux/m68k/coldfire/libpthread.abilist    |  26 ++
 .../unix/sysv/linux/m68k/m680x0/libpthread.abilist |  26 ++
 sysdeps/unix/sysv/linux/m68k/mmap.S                |   1 +
 .../unix/sysv/linux/microblaze/libpthread.abilist  |  26 ++
 sysdeps/unix/sysv/linux/microblaze/mmap.S          |   1 +
 .../unix/sysv/linux/mips/mips32/libpthread.abilist |  26 ++
 .../unix/sysv/linux/mips/mips64/libpthread.abilist |  26 ++
 sysdeps/unix/sysv/linux/mips/mips64/n32/mmap.c     |   5 +-
 sysdeps/unix/sysv/linux/mmap64.c                   |   6 +-
 sysdeps/unix/sysv/linux/nios2/libpthread.abilist   |  26 ++
 sysdeps/unix/sysv/linux/powerpc/ioctl.c            |   6 +-
 .../linux/powerpc/powerpc32/libpthread.abilist     |  26 ++
 .../linux/powerpc/powerpc64/libpthread-le.abilist  |  26 ++
 .../linux/powerpc/powerpc64/libpthread.abilist     |  26 ++
 .../sysv/linux/s390/s390-32/libpthread.abilist     |  26 ++
 sysdeps/unix/sysv/linux/s390/s390-32/mmap.S        |   1 +
 sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S      |   1 +
 .../sysv/linux/s390/s390-64/libpthread.abilist     |  26 ++
 sysdeps/unix/sysv/linux/s390/s390-64/mmap.S        |   2 +
 sysdeps/unix/sysv/linux/sh/libpthread.abilist      |  26 ++
 .../sysv/linux/sparc/sparc32/libpthread.abilist    |  26 ++
 .../sysv/linux/sparc/sparc64/libpthread.abilist    |  26 ++
 sysdeps/unix/sysv/linux/tcsetattr.c                |   3 +-
 .../linux/tile/tilegx/tilegx32/libpthread.abilist  |  26 ++
 .../linux/tile/tilegx/tilegx64/libpthread.abilist  |  26 ++
 .../sysv/linux/tile/tilepro/libpthread.abilist     |  26 ++
 sysdeps/unix/sysv/linux/wordsize-64/mmap.c         |   6 +-
 sysdeps/unix/sysv/linux/x86/Implies                |   1 +
 .../unix/sysv/linux/x86_64/64/libpthread.abilist   |  26 ++
 .../unix/sysv/linux/x86_64/x32/libpthread.abilist  |  26 ++
 sysdeps/x86/{ => nptl}/bits/pthreadtypes.h         | 104 +-----
 sysdeps/x86/nptl/bits/thread-shared-types.h        | 120 +++++++
 sysdeps/x86_64/nptl/tls.h                          |   6 +-
 sysdeps/x86_64/x32/nptl/tls.h                      |   2 +-
 155 files changed, 4998 insertions(+), 1226 deletions(-)
 create mode 100644 bits/thread-shared-types.h
 create mode 100644 conform/data/threads.h-data
 create mode 100644 manual/isothreads.texi
 create mode 100644 nptl/call_once.c
 create mode 100644 nptl/cnd_broadcast.c
 create mode 100644 nptl/cnd_destroy.c
 create mode 100644 nptl/cnd_init.c
 create mode 100644 nptl/cnd_signal.c
 create mode 100644 nptl/cnd_timedwait.c
 create mode 100644 nptl/cnd_wait.c
 create mode 100644 nptl/mtx_destroy.c
 create mode 100644 nptl/mtx_init.c
 create mode 100644 nptl/mtx_lock.c
 create mode 100644 nptl/mtx_timedlock.c
 create mode 100644 nptl/mtx_trylock.c
 create mode 100644 nptl/mtx_unlock.c
 create mode 100644 nptl/thrd_create.c
 create mode 100644 nptl/thrd_current.c
 create mode 100644 nptl/thrd_detach.c
 create mode 100644 nptl/thrd_equal.c
 create mode 100644 nptl/thrd_exit.c
 create mode 100644 nptl/thrd_join.c
 create mode 100644 nptl/thrd_priv.h
 create mode 100644 nptl/thrd_sleep.c
 create mode 100644 nptl/thrd_yield.c
 create mode 100644 nptl/tss_create.c
 create mode 100644 nptl/tss_delete.c
 create mode 100644 nptl/tss_get.c
 create mode 100644 nptl/tss_set.c
 create mode 100644 nptl/tst-call-once.c
 create mode 100644 nptl/tst-cnd-basic.c
 create mode 100644 nptl/tst-cnd-broadcast.c
 create mode 100644 nptl/tst-cnd-timedwait.c
 create mode 100644 nptl/tst-mtx-basic.c
 create mode 100644 nptl/tst-mtx-recursive.c
 create mode 100644 nptl/tst-mtx-timedlock.c
 create mode 100644 nptl/tst-mtx-trylock.c
 create mode 100644 nptl/tst-thrd-detach.c
 create mode 100644 nptl/tst-thrd-sleep.c
 create mode 100644 nptl/tst-tss-basic.c
 create mode 100644 sysdeps/aarch64/nptl/bits/thread-shared-types.h
 rename sysdeps/{unix/sysv/linux/alpha => alpha/nptl}/bits/pthreadtypes.h (70%)
 create mode 100644 sysdeps/alpha/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/arm/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/hppa/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/ia64/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/m68k/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/microblaze/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/mips/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/nios2/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/nptl/bits/pthreadtypes-common.h
 create mode 100644 sysdeps/nptl/threads.h
 rename sysdeps/{unix/sysv/linux/powerpc => powerpc/nptl}/bits/pthreadtypes.h (63%)
 create mode 100644 sysdeps/powerpc/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/s390/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/sh/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/sparc/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/tile/nptl/bits/thread-shared-types.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/Implies
 rename sysdeps/x86/{ => nptl}/bits/pthreadtypes.h (64%)
 create mode 100644 sysdeps/x86/nptl/bits/thread-shared-types.h

-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]