Summary: reinterpret_cast actually breaks on linux, despite working on FreeBSD
Reviewed By: dreiss
Test Plan: Compile on Linux OR FreeBSD
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665211
13f79535-47bb-0310-9956-
ffa450edef68
}
id_t getId() {
- return reinterpret_cast<id_t>(pthread_);
+ // TODO(dreiss): Stop using C-style casts.
+ return (id_t)pthread_;
}
shared_ptr<Runnable> runnable() const { return Thread::runnable(); }
void setDetached(bool value) { detached_ = value; }
- Thread::id_t getCurrentThreadId() const {return reinterpret_cast<id_t>(pthread_self());}
+ Thread::id_t getCurrentThreadId() const {
+ // TODO(dreiss): Stop using C-style casts.
+ return (id_t)pthread_self();
+ }
};