Navigation Menu

Skip to content

Commit

Permalink
[pin/thread][pin/tls] Add error checking for PIN TLS. Still broken, P…
Browse files Browse the repository at this point in the history
…IN_RegisterNewThread does not exist.
  • Loading branch information
Nathan Beckmann committed Sep 10, 2009
1 parent da2b13b commit 1a76930
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions pin/pin_thread.cc
Expand Up @@ -9,6 +9,7 @@ PinThreadRunner::PinThreadRunner(Thread::ThreadFunc func, void *param)

void PinThreadRunner::RunThread(OS_SERVICES::ITHREAD *)
{
// PIN_RegisterNewThread();
m_func(m_param);
}

Expand Down
7 changes: 6 additions & 1 deletion pin/pin_tls.cc
@@ -1,4 +1,5 @@
#include "tls.h"
#include "log.h"
#include <pin.H>

class PinTLS : public TLS
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1a76930

Please sign in to comment.