Improve the thread support for VxWorks
authorCorentin Gay <gay@adacore.com>
Thu, 14 Nov 2019 15:58:31 +0000 (15:58 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Thu, 14 Nov 2019 15:58:31 +0000 (15:58 +0000)
commit806dd0472f56fd8fc410f106660b1ad2c7505bd7
tree28b76cb20eb4fa23781aba02a1910fc7a2aca914
parent78e49fb1bc69592389a09ce5544b40fef634e893
Improve the thread support for VxWorks

2019-11-12  Corentin Gay  <gay@adacore.com>
    Jerome Lambourg  <lambourg@adacore.com>
    Olivier Hainque  <hainque@adacore.com>

libgcc/

* config/t-gthr-vxworks: New file, add all the gthr-vxworks
sources to LIB2ADDEH.
* config/t-vxworks: Remove adjustments to LIB2ADDEH.
* config/t-vxworks7: Likewise.

* config.host: Append a block at the end of the file to add the
t-gthr files to the tmake_file list for VxWorks after everything
else.

* config/vxlib.c: Rename as gthr-vxworks.c.
* config/vxlib-tls.c: Rename as gthr-vxworks-tls.c.

* config/gthr-vxworks.h: Simplify a few comments.  Expose a TAS
API and a basic error checking API, both internal.  Simplify the
__gthread_once_t type definition and initializers.  Add sections
for condition variables support and for the C++0x thread support,
conditioned against Vx653 for the latter.

* config/gthr-vxworks.c (__gthread_once): Simplify comments and
implementation, leveraging the TAS internal API.
* config/gthr-vxworks-tls.c: Introduce an internal TLS data access
API, leveraging the general availability of TLS services in VxWorks7
post SR6xxx.
(__gthread_setspecific, __gthread_setspecific): Use it.
(tls_delete_hook): Likewise, and simplify the enter/leave dtor logic.
* config/gthr-vxworks-cond.c: New file.  GTHREAD_COND variable
support based on VxWorks primitives.
* config/gthr-vxworks-thread.c: New file.  GTHREAD_CXX0X support
based on VxWorks primitives.

Co-Authored-By: Jerome Lambourg <lambourg@adacore.com>
Co-Authored-By: Olivier Hainque <hainque@adacore.com>
From-SVN: r278249
12 files changed:
libgcc/ChangeLog
libgcc/config.host
libgcc/config/gthr-vxworks-cond.c [new file with mode: 0644]
libgcc/config/gthr-vxworks-thread.c [new file with mode: 0644]
libgcc/config/gthr-vxworks-tls.c [new file with mode: 0644]
libgcc/config/gthr-vxworks.c [new file with mode: 0644]
libgcc/config/gthr-vxworks.h
libgcc/config/t-gthr-vxworks [new file with mode: 0644]
libgcc/config/t-vxworks
libgcc/config/t-vxworks7
libgcc/config/vxlib-tls.c [deleted file]
libgcc/config/vxlib.c [deleted file]