projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dadc738
)
Use _lwp_self() in THREADSilentGetCurrentThreadId() for NetBSD
author
Kamil Rytarowski
<n54@gmx.com>
Tue, 12 Apr 2016 00:26:54 +0000
(
02:26
+0200)
committer
Kamil Rytarowski
<n54@gmx.com>
Tue, 12 Apr 2016 00:26:54 +0000
(
02:26
+0200)
The _lwp_self() call returns the LWP ID of the calling LWP.
It requires <lwp.h> on NetBSD.
src/pal/src/include/pal/thread.hpp
patch
|
blob
|
history
diff --git
a/src/pal/src/include/pal/thread.hpp
b/src/pal/src/include/pal/thread.hpp
index
524c552
..
e6dacd2
100644
(file)
--- a/
src/pal/src/include/pal/thread.hpp
+++ b/
src/pal/src/include/pal/thread.hpp
@@
-828,6
+828,9
@@
inline SIZE_T THREADSilentGetCurrentThreadId() {
pthread_threadid_np(pthread_self(), &tid);
return (SIZE_T)tid;
}
+#elif defined(__NetBSD__)
+#include <lwp.h>
+#define THREADSilentGetCurrentThreadId() (SIZE_T)_lwp_self()
#else
#define THREADSilentGetCurrentThreadId() (SIZE_T)pthread_self()
#endif