![]() |
v8
3.14.5(node0.10.28)
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 90 of file v8threads.h.
| void ArchiveThread | ( | ) |
Definition at line 331 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 411 of file v8threads.cc.
References ThreadId::Current().
Referenced by ThreadManager::ArchiveThread().
| ThreadState * FirstThreadStateInUse | ( | ) |
Definition at line 287 of file v8threads.cc.
References ThreadState::Next().
Referenced by Deserializer::Deserialize(), ThreadManager::Iterate(), ThreadManager::IterateArchivedThreads(), and ThreadManager::TerminateExecution().
| void FreeThreadResources | ( | ) |
Definition at line 369 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 275 of file v8threads.cc.
References ThreadManager::ThreadState.
Referenced by ThreadManager::ArchiveThread().
| bool IsArchived | ( | ) |
Definition at line 381 of file v8threads.cc.
References Isolate::FindPerThreadDataForThisThread(), v8::internal::NULL, and Isolate::PerIsolateThreadData::thread_state().
Referenced by ThreadManager::ArchiveThread().
|
inline |
Definition at line 102 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 387 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 400 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 416 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 137 of file v8threads.h.
|
friend |
Definition at line 138 of file v8threads.h.
Referenced by ThreadManager::GetFreeThreadState().