aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorRasmus Villemoes <rv@rasmusvillemoes.dk>2020-10-02 15:31:58 +0000
committerOlivier Hainque <hainque@adacore.com>2020-10-16 16:16:17 +0000
commita6590686f72e2a99d290b5e96e54e550446009de (patch)
tree356b467a0fb314819a0e89909bc05fb9bbe099a9 /libgcc
parente94d5836e54558f78f1845de07db273611972c26 (diff)
downloadgcc-a6590686f72e2a99d290b5e96e54e550446009de.zip
gcc-a6590686f72e2a99d290b5e96e54e550446009de.tar.gz
gcc-a6590686f72e2a99d290b5e96e54e550446009de.tar.bz2
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.
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/config/gthr-vxworks-thread.c4
-rw-r--r--libgcc/config/gthr-vxworks.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/libgcc/config/gthr-vxworks-thread.c b/libgcc/config/gthr-vxworks-thread.c
index 8e26d85..a723005 100644
--- a/libgcc/config/gthr-vxworks-thread.c
+++ b/libgcc/config/gthr-vxworks-thread.c
@@ -27,6 +27,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
exposed by gthr-vxworks.h, using APIs exposed by regular (!AE/653)
VxWorks kernels. */
+#if __GTHREAD_CXX0X
+
#include "gthr.h"
#include <taskLib.h>
#include <stdlib.h>
@@ -384,3 +386,5 @@ __gthread_detach (__gthread_t __threadid)
return OK;
}
+
+#endif
diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h
index d49809a..beedf5e 100644
--- a/libgcc/config/gthr-vxworks.h
+++ b/libgcc/config/gthr-vxworks.h
@@ -267,7 +267,7 @@ extern int __gthread_cond_wait_recursive (__gthread_cond_t *cond,
/* We do not support C++0x threads on that VxWorks 653, which we can
recognize by VTHREADS being defined. */
-#ifndef VTHREADS
+#if _VXWORKS_MAJOR_GE(6) && !defined(VTHREADS)
#define __GTHREADS_CXX0X 1
@@ -330,7 +330,7 @@ extern int __gthread_detach (__gthread_t thread);
extern __gthread_t __gthread_self (void);
-#endif
+#endif /* _VXWORKS_MAJOR_GE(6) && !defined(VTHREADS) */
#ifdef __cplusplus
}