Permalink
Browse files

[pin/thread][pin/tls] Add error checking for PIN TLS. Still broken, P…

…IN_RegisterNewThread does not exist.
  • Loading branch information...
Nathan Beckmann
Nathan Beckmann committed Sep 10, 2009
1 parent da2b13b commit 1a76930ec58c9367e47fe6c70b1a1844e715b011
Showing with 7 additions and 1 deletion.
  1. +1 −0 pin/pin_thread.cc
  2. +6 −1 pin/pin_tls.cc
View
@@ -9,6 +9,7 @@ PinThreadRunner::PinThreadRunner(Thread::ThreadFunc func, void *param)
void PinThreadRunner::RunThread(OS_SERVICES::ITHREAD *)
{
+// PIN_RegisterNewThread();
m_func(m_param);
}
View
@@ -1,4 +1,5 @@
#include "tls.h"
+#include "log.h"
#include <pin.H>
class PinTLS : public TLS
@@ -26,7 +27,11 @@ class PinTLS : public TLS
void set(void *vp)
{
- PIN_SetThreadData(m_key, vp);
+ LOG_PRINT("%p->set(%p)", this, vp);
+ LOG_ASSERT_ERROR(
+ PIN_SetThreadData(m_key, vp),
+ "Error setting TLS -- pin tid = %d",
+ PIN_ThreadId());
}
private:

0 comments on commit 1a76930

Please sign in to comment.