Commit 8e48641c authored by bjaideep's avatar bjaideep Committed by Commit bot

AIX: use intptr_t to cast a pointer

On AIX64 pthread_t is of type unsigned int (4bytes),
using intptr_t instead when casting a pointer.

R=lpy@chromium.org, jochen@chromium.org, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/1938833002
Cr-Commit-Position: refs/heads/master@{#36141}
parent 4cdf71e2
...@@ -712,7 +712,13 @@ class SamplerThread : public base::Thread { ...@@ -712,7 +712,13 @@ class SamplerThread : public base::Thread {
if (SignalHandler::Installed()) { if (SignalHandler::Installed()) {
for (HashMap::Entry *p = thread_id_to_samplers_.Get().Start(); for (HashMap::Entry *p = thread_id_to_samplers_.Get().Start();
p != NULL; p = thread_id_to_samplers_.Get().Next(p)) { p != NULL; p = thread_id_to_samplers_.Get().Next(p)) {
#if V8_OS_AIX && V8_TARGET_ARCH_PPC64
// on AIX64, cannot cast (void *) to pthread_t which is
// of type unsigned int (4bytes)
pthread_t thread_id = reinterpret_cast<intptr_t>(p->key);
#else
pthread_t thread_id = reinterpret_cast<pthread_t>(p->key); pthread_t thread_id = reinterpret_cast<pthread_t>(p->key);
#endif
pthread_kill(thread_id, SIGPROF); pthread_kill(thread_id, SIGPROF);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment