[compiler-rt] r177927 - Add a GetTid() implementation for Windows
Timur Iskhodzhanov
timurrrr at google.com
Mon Mar 25 15:04:30 PDT 2013
Author: timurrrr
Date: Mon Mar 25 17:04:29 2013
New Revision: 177927
URL: http://llvm.org/viewvc/llvm-project?rev=177927&view=rev
Log:
Add a GetTid() implementation for Windows
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc?rev=177927&r1=177926&r2=177927&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc Mon Mar 25 17:04:29 2013
@@ -45,10 +45,16 @@ int GetPid() {
return GetProcessId(GetCurrentProcess());
}
-uptr GetThreadSelf() {
+// In contrast to POSIX, on Windows GetCurrentThreadId()
+// returns a system-unique identifier.
+uptr GetTid() {
return GetCurrentThreadId();
}
+uptr GetThreadSelf() {
+ return GetTid();
+}
+
void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top,
uptr *stack_bottom) {
CHECK(stack_top);
More information about the llvm-commits
mailing list