projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b44092
)
[runtime] Implement GetCurrentThreadId () using mono-threads.
author
Zoltan Varga
<vargaz@gmail.com>
Sat, 1 Feb 2014 12:50:47 +0000
(13:50 +0100)
committer
Zoltan Varga
<vargaz@gmail.com>
Sat, 1 Feb 2014 12:50:47 +0000
(13:50 +0100)
mono/io-layer/wthreads.c
patch
|
blob
|
history
diff --git
a/mono/io-layer/wthreads.c
b/mono/io-layer/wthreads.c
index 37ae8c41608b299a80ba8c950bf0588f9448c018..77918e20f916ef18f3ac1a2ff9c8373a60b474ae 100644
(file)
--- a/
mono/io-layer/wthreads.c
+++ b/
mono/io-layer/wthreads.c
@@
-341,17
+341,10
@@
gpointer OpenThread (guint32 access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSE
*/
gsize GetCurrentThreadId(void)
{
- pthread_t tid = pthread_self();
-
-#ifdef PTHREAD_POINTER_ID
- /* Don't use GPOINTER_TO_UINT here, it can't cope with
- * sizeof(void *) > sizeof(uint) when a cast to uint would
- * overflow
- */
- return((gsize)tid);
-#else
- return(tid);
-#endif
+ MonoNativeThreadId id;
+
+ id = mono_native_thread_id_get ();
+ return MONO_NATIVE_THREAD_ID_TO_UINT (id);
}
gpointer _wapi_thread_duplicate ()