This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR 54805: __gthread_tsd* in vxlib-tls.c

Hello all,

Since nobody has commented on bug 54805, and I'm pretty sure this is valid (and obvious), I'm just submitting it to the list.

This removes warnings about implicit declarations and fixes one of the function calls in vxlib-tls.c for vxworks targets.

I got the old prototypes from

See bug for further details.

Someone please comment or commit :)

Robert Mason
>From d008e235167796417cf6a8f68f7206dc4351b5c3 Mon Sep 17 00:00:00 2001
From: rbmj <>
Date: Wed, 26 Sep 2012 20:12:52 -0400
Subject: [PATCH] [libgcc] 	* config/vxlib-tls.c: Put declarations for
 kernel space TSD

 libgcc/config/vxlib-tls.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/libgcc/config/vxlib-tls.c b/libgcc/config/vxlib-tls.c
index c469676..a2f5e34 100644
--- a/libgcc/config/vxlib-tls.c
+++ b/libgcc/config/vxlib-tls.c
@@ -102,6 +102,14 @@ extern void __gthread_set_tls_data (void
 extern void __gthread_enter_tls_dtor_context (void);
 extern void __gthread_leave_tls_dtor_context (void);
+#ifndef __RTP__
+extern void *__gthread_get_tsd_data(WIND_TCB *tcb);
+extern void __gthread_set_tsd_data(WIND_TCB *tcb, void *data);
+extern void __gthread_enter_tsd_dtor_context(WIND_TCB *tcb);
+extern void __gthread_leave_tsd_dtor_context(WIND_TCB *tcb);
+#endif /* __RTP__ */
 /* This is a global structure which records all of the active keys.
@@ -150,7 +158,7 @@ static __gthread_once_t tls_init_guard =
    need to read tls_keys.dtor[key] atomically.  */
 static void
-tls_delete_hook (void *tcb ATTRIBUTE_UNUSED)
+tls_delete_hook (void *tcb)
   struct tls_data *data;
   __gthread_key_t key;
@@ -185,7 +193,7 @@ tls_delete_hook (void *tcb ATTRIBUTE_UNU
 #ifdef __RTP__
       __gthread_leave_tls_dtor_context ();
-      __gthread_leave_tsd_dtor_context ();
+      __gthread_leave_tsd_dtor_context (tcb);
 #ifdef __RTP__


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]