![]() |
v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <v8threads.h>
Public Member Functions | |
void | Lock () |
void | Unlock () |
void | ArchiveThread () |
bool | RestoreThread () |
void | FreeThreadResources () |
bool | IsArchived () |
void | Iterate (ObjectVisitor *v) |
void | IterateArchivedThreads (ThreadVisitor *v) |
bool | IsLockedByCurrentThread () |
ThreadId | CurrentId () |
void | TerminateExecution (ThreadId thread_id) |
ThreadState * | FirstThreadStateInUse () |
ThreadState * | GetFreeThreadState () |
Friends | |
class | Isolate |
class | ThreadState |
Definition at line 89 of file v8threads.h.
void ArchiveThread | ( | ) |
Definition at line 314 of file v8threads.cc.
References ASSERT, ThreadId::Current(), ThreadManager::CurrentId(), ThreadManager::GetFreeThreadState(), ThreadState::id(), ThreadId::Invalid(), ThreadManager::IsArchived(), ThreadManager::IsLockedByCurrentThread(), ThreadState::set_id(), Isolate::PerIsolateThreadData::set_thread_state(), and ThreadState::Unlink().
Referenced by Unlocker::Unlocker(), and Locker::~Locker().
ThreadId CurrentId | ( | ) |
Definition at line 394 of file v8threads.cc.
References ThreadId::Current().
Referenced by ThreadManager::ArchiveThread().
ThreadState * FirstThreadStateInUse | ( | ) |
Definition at line 281 of file v8threads.cc.
References ThreadState::Next().
Referenced by Deserializer::Deserialize(), ThreadManager::Iterate(), ThreadManager::IterateArchivedThreads(), and ThreadManager::TerminateExecution().
void FreeThreadResources | ( | ) |
Definition at line 352 of file v8threads.cc.
References Isolate::bootstrapper(), RegExpStack::FreeThreadResources(), Bootstrapper::FreeThreadResources(), StackGuard::FreeThreadResources(), HandleScopeImplementer::FreeThreadResources(), Isolate::FreeThreadResources(), Isolate::handle_scope_implementer(), Isolate::regexp_stack(), and Isolate::stack_guard().
Referenced by Locker::~Locker().
ThreadState * GetFreeThreadState | ( | ) |
Definition at line 269 of file v8threads.cc.
References ThreadManager::ThreadState.
Referenced by ThreadManager::ArchiveThread().
bool IsArchived | ( | ) |
Definition at line 364 of file v8threads.cc.
References Isolate::FindPerThreadDataForThisThread(), v8::internal::NULL, and Isolate::PerIsolateThreadData::thread_state().
Referenced by ThreadManager::ArchiveThread().
|
inline |
Definition at line 101 of file v8threads.h.
References ThreadId::Current().
Referenced by ThreadManager::ArchiveThread(), Locker::IsLocked(), ThreadManager::Lock(), Locker::Locker(), ThreadManager::RestoreThread(), Unlocker::Unlocker(), Locker::~Locker(), and Unlocker::~Unlocker().
void Iterate | ( | ObjectVisitor * | v | ) |
Definition at line 370 of file v8threads.cc.
References ThreadState::data(), ThreadManager::FirstThreadStateInUse(), HandleScopeImplementer::Iterate(), Isolate::Iterate(), ThreadState::Next(), and v8::internal::NULL.
Referenced by Heap::IterateStrongRoots().
void IterateArchivedThreads | ( | ThreadVisitor * | v | ) |
Definition at line 383 of file v8threads.cc.
References HandleScopeImplementer::ArchiveSpacePerThread(), ThreadState::data(), ThreadManager::FirstThreadStateInUse(), Isolate::IterateThread(), ThreadState::Next(), and v8::internal::NULL.
void Lock | ( | ) |
Definition at line 212 of file v8threads.cc.
References ASSERT, ThreadId::Current(), ThreadManager::IsLockedByCurrentThread(), and Mutex::Lock().
Referenced by Locker::Locker(), and Unlocker::~Unlocker().
bool RestoreThread | ( | ) |
Definition at line 155 of file v8threads.cc.
References ASSERT, Isolate::bootstrapper(), ThreadId::Current(), ThreadState::data(), Isolate::FindPerThreadDataForThisThread(), ThreadState::FREE_LIST, Isolate::handle_scope_implementer(), StackGuard::InitThread(), ThreadId::Invalid(), ThreadManager::IsLockedByCurrentThread(), ThreadState::LinkInto(), v8::internal::NULL, Isolate::regexp_stack(), RegExpStack::RestoreStack(), StackGuard::RestoreStackGuard(), Bootstrapper::RestoreState(), HandleScopeImplementer::RestoreThread(), Isolate::RestoreThread(), ThreadState::set_id(), ThreadState::set_terminate_on_restore(), Isolate::PerIsolateThreadData::set_thread_state(), Isolate::stack_guard(), ThreadState::terminate_on_restore(), StackGuard::TerminateExecution(), Isolate::PerIsolateThreadData::thread_state(), and ThreadState::Unlink().
Referenced by Locker::Locker(), and Unlocker::~Unlocker().
void TerminateExecution | ( | ThreadId | thread_id | ) |
Definition at line 399 of file v8threads.cc.
References ThreadManager::FirstThreadStateInUse(), ThreadState::id(), ThreadState::Next(), v8::internal::NULL, and ThreadState::set_terminate_on_restore().
Referenced by V8::TerminateExecution().
void Unlock | ( | ) |
Definition at line 219 of file v8threads.cc.
References ThreadId::Invalid(), and Mutex::Unlock().
Referenced by Unlocker::Unlocker(), and Locker::~Locker().
|
friend |
Definition at line 134 of file v8threads.h.
|
friend |
Definition at line 135 of file v8threads.h.
Referenced by ThreadManager::GetFreeThreadState().