Mon Dec 20 11:58:33 CET 2004 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Mon, 20 Dec 2004 10:55:10 +0000 (10:55 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Mon, 20 Dec 2004 10:55:10 +0000 (10:55 -0000)
* threads.c, threads.h: add accessor to get the pthread_key_t for
a tls id.

svn path=/trunk/mono/; revision=37955

mono/io-layer/ChangeLog
mono/io-layer/threads.c
mono/io-layer/threads.h

index cafd039fcfcd081178ad325d2c4b37fdba357902..0a5c6f440a057891be140cac02da7fbd34ec0155 100644 (file)
@@ -1,3 +1,9 @@
+
+Mon Dec 20 11:58:33 CET 2004 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c, threads.h: add accessor to get the pthread_key_t for
+       a tls id.
+
 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * io.c: check for the existence of 'dest' and set ERROR_ALREADY_EXISTS
index e5e8fbaf3df81e74cf9041790239a08068623b98..f464f0b94230e4f83d2dcb43c2636bb23e2aa0d9 100644 (file)
@@ -709,6 +709,12 @@ static pthread_key_t TLS_keys[TLS_MINIMUM_AVAILABLE];
 static gboolean TLS_used[TLS_MINIMUM_AVAILABLE]={FALSE};
 static guint32 TLS_spinlock=0;
 
+guint32
+mono_pthread_key_for_tls (guint32 idx)
+{
+       return (guint32)TLS_keys [idx];
+}
+
 /**
  * TlsAlloc:
  *
index e074463af13094fcf080ec60a204a8e0781b1a50..b9602c8373ce0ed584ee6888fe901b291b1d94f9 100644 (file)
@@ -48,6 +48,7 @@ extern guint32 GetCurrentThreadId(void);
 extern gpointer GetCurrentThread(void);
 extern guint32 ResumeThread(gpointer handle);
 extern guint32 SuspendThread(gpointer handle);
+extern guint32 mono_pthread_key_for_tls (guint32 idx);
 extern guint32 TlsAlloc(void);
 extern gboolean TlsFree(guint32 idx);
 extern gpointer TlsGetValue(guint32 idx);