Lines Matching refs:Thread
52 // 0 is never a valid thread id
365 class Thread::PlatformData : public Malloced {
368 pthread_t thread_; // Thread handle for pthread.
374 Thread::Thread(Isolate* isolate, const Options& options)
382 Thread::Thread(Isolate* isolate, const char* name)
390 Thread::~Thread() {
396 Thread* thread = reinterpret_cast<Thread*>(arg);
398 // don't know which thread will run first (the original thread or the new
400 thread->data()->thread_ = pthread_self();
401 ASSERT(thread->data()->thread_ != kNoThread);
402 Thread::SetThreadLocal(Isolate::isolate_key(), thread->isolate());
403 thread->Run();
408 void Thread::set_name(const char* name) {
414 void Thread::Start() {
427 void Thread::Join() {
432 static inline Thread::LocalStorageKey PthreadKeyToLocalKey(
434 // We need to cast pthread_key_t to Thread::LocalStorageKey in two steps
437 STATIC_ASSERT(sizeof(Thread::LocalStorageKey) == sizeof(pthread_key_t));
439 return static_cast<Thread::LocalStorageKey>(ptr_key);
444 Thread::LocalStorageKey local_key) {
445 STATIC_ASSERT(sizeof(Thread::LocalStorageKey) == sizeof(pthread_key_t));
451 Thread::LocalStorageKey Thread::CreateThreadLocalKey() {
460 void Thread::DeleteThreadLocalKey(LocalStorageKey key) {
468 void* Thread::GetThreadLocal(LocalStorageKey key) {
474 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
480 void Thread::YieldCPU() {
606 // Get a handle to the calling thread. This is the thread that we are
608 // going to use it in the sampler thread. Using GetThreadHandle() will
631 class SamplerThread : public Thread {
634 : Thread(NULL, "SamplerThread"),
659 // Implement Thread::Run().
703 // Context used for sampling the register state of the profiled thread.