Commit Graph

22 Commits

Author SHA1 Message Date
Jakub Jelinek 7adcbafe45 Update copyright years. 2022-01-03 10:42:10 +01:00
Jakub Jelinek 99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
Rasmus Villemoes a6590686f7 Inhibit support for C++0x threads on VxWorks < 6
As for condition variables, the C++0x threads support relies on
VxWorks entry points not available in VxWorks versions prior to 6.

We just expose absence of support for C++0x threads on such systems.

2020-10-15  Rasmus Villemoes  <rv@rasmusvillemoes.dk>

libgcc/
	* config/gthr-vxworks.h: Condition the ___GTHREADS_CXX0X
	section on VxWorks >= 6.
	* config/gthr-vxworks-thread.c: Condition the entire
	implementation on __GTHREAD_CXX0X.
2020-10-16 16:16:17 +00:00
Rasmus Villemoes e94d5836e5 Inhibit support for gthread condvars on VxWorks < 6
The condition variables support relies on kernel entry points
to enforce critical aspects of it's expected behavior.

Some of these entry points are not available prior to VxWorks 6,
so we just expose absence of support for condition variables on
such systems.

2020-10-15  Rasmus Villemoes  <rv@rasmusvillemoes.dk>

libgcc/
	* config/gthr-vxworks.h: Condition the __GTHREAD_HAS_COND
	section on VxWorks >= 6.
	* config/gthr-vxworks-cond.c: Condition the entire
	implementation on __GTHREAD_HAS_COND.
2020-10-16 16:14:52 +00:00
Rasmus Villemoes 21295f44f3 Fix leftover _VXW_PRE_69 in gthr-vxworks.h
2020-10-15  Rasmus Villemoes  <rv@rasmusvillemoes.dk>

libgcc/
	* config/gthr-vxworks.h: Rewrite remaining occurrence
	of _VXW_PRE_69 as _VXWORKS_PRE(6,9).
2020-10-16 16:14:52 +00:00
Olivier Hainque 5205a4456b Guard inclusion of vxAtomicLib.h from gthr-vxworks.h
2020-01-05  Olivier Hainque  <hainque@adacore.com>

        * config/gthr-vxworks.h: Guard #include vxAtomicLib.h
	by IN_LIBGCC2.

From-SVN: r279885
2020-01-05 12:45:54 +00:00
Jakub Jelinek 8d9254fc8a Update copyright years.
From-SVN: r279813
2020-01-01 12:51:42 +01:00
Olivier Hainque abb6c3eecf Introduce an internal API for VxWorks version checks
This changes introduces an internal API for VxWorks version checks
within runtime files, a prerequisite to a few fixes coming up for libstdc++
builds on more recent versions of the OS.

2019-12-30  Olivier Hainque  <hainque@adacore.com>

	gcc/
	* config/vxworks/_vxworks-versions.h: New file.
	* config.gcc (*-*-vxworks*): Add it to extra_headers.

	libgcc/
	* config/gthr-vxworks.h: Use _vxworks-versions.h.
	* config/gthr-vxworks-tls.c: Likewise.

From-SVN: r279783
2019-12-30 21:42:26 +00:00
Olivier Hainque d7f5094aa3 Improve VxWorks GTHREAD_ONCE_INIT
2019-12-30  Olivier Hainque  <hainque@adacore.com>

	* config/gthr-vxworks.h (GTHREAD_ONCE_INIT): Use
	standard zero-initializer syntax.

From-SVN: r279776
2019-12-30 21:22:21 +00:00
Corentin Gay 806dd0472f 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
2019-11-14 15:58:31 +00:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Rasmus Villemoes be7b071e9e libgcc: properly destroy mutexes on VxWorks
Just as one needs run-time initialization of mutexes, one needs to
destroy them properly to allow the OS to release resources associated
with the semaphore.

From-SVN: r265616
2018-10-30 08:33:04 +00:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jonathan Wakely 7727f8f2c0 re PR libgcc/64885 (libstdc++ all_attributes failure)
PR libgcc/64885
	* gthr-single.h: Use __unused__ attribute instead of unused.
	* config/gthr-vxworks.h: Likewise.
	* config/i386/gthr-win32.h: Likewise.

From-SVN: r221120
2015-03-02 18:02:18 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Richard Sandiford ac1dca3cab Update copyright years in libgcc/
From-SVN: r206295
2014-01-02 22:25:22 +00:00
Richard Sandiford 5d5bf77569 Update copyright in libgcc.
From-SVN: r195731
2013-02-04 19:06:20 +00:00
Jonathan Wakely 1504e3e1c4 re PR other/53889 (Gthreads doesn't support destroying recursive mutexes)
libgcc:

	PR other/53889
	* gthr.h (__gthread_recursive_mutex_destroy): Document new required
	function.
	* gthr-posix.h (__gthread_recursive_mutex_destroy): Define.
	* gthr-single.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/gthr-rtems.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/gthr-vxworks.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/i386/gthr-win32.h (__gthread_recursive_mutex_destroy):
	Likewise.
	* config/mips/gthr-mipssde.h (__gthread_recursive_mutex_destroy):
	Likewise.
	* config/pa/gthr-dce.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/s390/gthr-tpf.h (__gthread_recursive_mutex_destroy): Likewise.

libstdc++-v3:

	PR other/53889
	* include/std/mutex (__recursive_mutex_base::~__recursive_mutex_base):
	Use __gthread_recursive_mutex_destroy.
	(__recursive_mutex_base::_S_destroy): Remove.
	(__recursive_mutex_base::_S_destroy_win32): Likewise.
	* include/ext/concurrence.h (__recursive_mutex::~__recursive_mutex):
	Use __gthread_recursive_mutex_destroy.
	(__recursive_mutex::_S_destroy): Remove.
	(__recursive_mutex::_S_destroy_win32): Likewise.

From-SVN: r192002
2012-10-02 21:22:32 +01:00
Rainer Orth 9fbcc75d56 Return gthr-posix.h to libgcc (PR bootstrap/50982)
libgcc:
	PR bootstrap/50982
	* config/gthr-posix.h: Move ...
	* gthr-posix.h: ... here.
	* config/gthr-lynx.h: Reflect this.
	* config/gthr-vxworks.h: Likewise.
	* config/rs6000/gthr-aix.h: Likewise.
	* configure.ac (target_thread_file): Likewise.
	* configure: Regenerate.

	libstdc++-v3:
	PR bootstrap/50982
	* include/Makefile.am (${host_builddir}/gthr-posix.h): Reflect
	gthr-posix.h move.
	* include/Makefile.in: Regenerate.

From-SVN: r181095
2011-11-07 16:34:31 +00:00
Rainer Orth 5d1c8e77cf Move gthr to toplevel libgcc
gcc:
	* gthr-single.h, gthr.h: Move to ../libgcc.
	* gthr-aix.h: Move to ../libgcc/config/rs6000.
	* gthr-dce.h: Move to ../libgcc/config/pa.
	* gthr-lynx.h: Move to ../libgcc/config.
	* gthr-mipssde.h: Move to ../libgcc/config/mips.
	* gthr-posix.h: Move to ../libgcc/config.
	* gthr-rtems.h: Likewise.
	* gthr-tpf.h: Move to ../libgcc/config/s390.
	* gthr-vxworks.h: Move to ../libgcc/config.
	* gthr-win32.h: Move to ../libgcc/config/i386.
	* configure.ac (gthread_flags): Remove
	(gthr-default.h): Don't create.
	(thread_file): Don't substitute.
	* configure: Regenerate.
	* Makefile.in (GCC_THREAD_FILE): Remove.
	(GTHREAD_FLAGS): Remove.
	(libgcc.mvars): Remove GTHREAD_FLAGS.
	* config/t-vxworks (EXTRA_HEADERS): Remove.

	gcc/po:
	* EXCLUDES (gthr-aix.h, gthr-dce.h, gthr-posix.c, gthr-posix.h)
	(gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h)
	(gthr-win32.h, gthr.h): Remove.

	libgcc:
	* gthr-single.h, gthr.h: New files.
	* config/gthr-lynx.h, config/gthr-posix.h., config/gthr-rtems.h,
	config/gthr-vxworks.h, config/i386/gthr-win32.h,
	config/mips/gthr-mipssde.h, config/pa/gthr-dce.h,
	config/rs6000/gthr-aix.h, config/s390/gthr-tpf.h: New files.
	* config/i386/gthr-win32.c: Include "gthr-win32.h".
	* configure.ac (thread_header): New variable.
	Set it depending on target_thread_file.
	(gthr-default.h): Link from $thread_header.
	* configure: Regenerate.
	* Makefile.in (LIBGCC2_CFLAGS): Remove $(GTHREAD_FLAGS).

	libgfortran:
	* Makefile.am (AM_CPPFLAGS): Add
	-I$(srcdir)/$(MULTISRCTOP)../libgcc, -I$(MULTIBUILDTOP)../libgcc.
	* Makefile.in: Regenerate.
	* acinclude.m4 (LIBGFOR_CHECK_GTHR_DEFAULT): Remove.
	* configure.ac (LIBGFOR_CHECK_GTHR_DEFAULT): Likewise.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	libobjc:
	* Makefile.in (INCLUDES): Add -I$(MULTIBUILDTOP)../libgcc.
	* configure.ac (target_thread_file, HAVE_GTHR_DEFAULT): Remove.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	libstdc++-v3:
	* acinclude.m4 (GLIBCXX_CONFIGURE): Determine and substitute
	toplevel_builddir.
	(GLIBCXX_ENABLE_THREADS): Remove glibcxx_thread_h,
	HAVE_GTHR_DEFAULT, enable_thread.
	(GLIBCXX_CHECK_GTHREADS): Reflect gthr move to libgcc.
	* include/Makefile.am (thread_host_headers): Remove
	${host_builddir}/gthr-tpf.h.
	(${host_builddir}/gthr.h): Reflect gthr move to libgcc.
	Use $<.
	(${host_builddir}/gthr-single.h): Likewise.
	(${host_builddir}/gthr-posix.h): Likewise.
	(${host_builddir}/gthr-tpf.h): Remove.
	(${host_builddir}/gthr-default.h): Likewise.
	* configure, config.h.in: Regenerate.
	* Makefile.in, doc/Makefile.in, include/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
	src/Makefile.intestsuite/Makefile.in: Regenerate.

From-SVN: r180776
2011-11-02 15:28:43 +00:00