summaryrefslogtreecommitdiff
path: root/gcc/gthr-vxworks.h
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-14 13:58:21 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-14 13:58:21 +0000
commitefe5559cf8684fd0d186df505ac5246722ec3901 (patch)
treed5c31c7d5ee59f473a0dde8950358b7136d27a70 /gcc/gthr-vxworks.h
parent809bb1c7605c89caa354fc956efd5ef68871b652 (diff)
downloadgcc-efe5559cf8684fd0d186df505ac5246722ec3901.tar.gz
gcc/
200x-xx-xx Richard Sandiford <richard@codesourcery.com> Phil Edwards <phil@codesourcery.com> * gthr-vxworks.h: Add an extern "C" wrapper for C++. (__gthread_once_t): Remove busy field for RTPs. (__GTHREAD_ONCE_INIT): Update accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122923 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gthr-vxworks.h')
-rw-r--r--gcc/gthr-vxworks.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/gthr-vxworks.h b/gcc/gthr-vxworks.h
index 5ff5234219f..c11d3a20cab 100644
--- a/gcc/gthr-vxworks.h
+++ b/gcc/gthr-vxworks.h
@@ -37,6 +37,10 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#else
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define __GTHREADS 1
#define __gthread_active_p() 1
@@ -103,12 +107,18 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
typedef struct
{
+#ifndef __RTP__
volatile unsigned char busy;
+#endif
volatile unsigned char done;
}
__gthread_once_t;
-#define __GTHREAD_ONCE_INIT { 0, 0 }
+#ifndef __RTP__
+# define __GTHREAD_ONCE_INIT { 0, 0 }
+#else
+# define __GTHREAD_ONCE_INIT { 0 }
+#endif
extern int __gthread_once (__gthread_once_t *once, void (*func)(void));
@@ -125,6 +135,10 @@ extern int __gthread_key_delete (__gthread_key_t key);
extern void *__gthread_getspecific (__gthread_key_t key);
extern int __gthread_setspecific (__gthread_key_t key, void *ptr);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* not _LIBOBJC */
#endif /* gthr-vxworks.h */