[patch 3/7] Improve the thread support for VxWorks
Olivier Hainque
hainque@adacore.com
Thu Nov 14 11:45:00 GMT 2019
Hello,
This change adds support for the __GTHREAD_HAS_COND and __GTHREADS_CXX0X
facilities on top of what was already there for the base __GTHREADS code
on VxWorks. It also improves the general support to handle VxWorks 7 in
more configurations.
Split the current vxlib.c source into separate files for this, adopting
a naming convention similar to what other ports do.
Extract the parts of t-vxworks* adding those sources to the libgcc
closure into separate files, so we can include the separate fragments
after everything else for all the ports. Useful in particular for arm,
where t-bpabi resets LIB2ADDEH on purpose.
Tested together with the other patches in the series. We have also
had good c++ and libstdc++ test results on gcc-8 with this, associated
with additional changes that we haven't yet ported to more recent
versions of gcc (porting in progresss).
Olivier
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Improve-the-thread-support-for-VxWorks.patch
Type: application/octet-stream
Size: 38794 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191114/160c747c/attachment.obj>
-------------- next part --------------
More information about the Gcc-patches
mailing list