v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Thread Class Referenceabstract

#include <platform.h>

Inheritance diagram for Thread:

Data Structures

class  Options
 
class  PlatformData
 

Public Types

enum  LocalStorageKey { LOCAL_STORAGE_KEY_MIN_VALUE = kMinInt, LOCAL_STORAGE_KEY_MAX_VALUE = kMaxInt }
 

Public Member Functions

 Thread (const Options &options)
 
virtual ~Thread ()
 
void Start ()
 
void StartSynchronously ()
 
void Join ()
 
const char * name () const
 
virtual void Run ()=0
 
PlatformDatadata ()
 
void NotifyStartedAndRun ()
 

Static Public Member Functions

static LocalStorageKey CreateThreadLocalKey ()
 
static void DeleteThreadLocalKey (LocalStorageKey key)
 
static void * GetThreadLocal (LocalStorageKey key)
 
static int GetThreadLocalInt (LocalStorageKey key)
 
static void SetThreadLocal (LocalStorageKey key, void *value)
 
static void SetThreadLocalInt (LocalStorageKey key, int value)
 
static bool HasThreadLocal (LocalStorageKey key)
 
static void * GetExistingThreadLocal (LocalStorageKey key)
 
static void YieldCPU ()
 

Static Public Attributes

static const int kMaxThreadNameLength = 16
 

Detailed Description

Definition at line 517 of file platform.h.

Member Enumeration Documentation

Enumerator
LOCAL_STORAGE_KEY_MIN_VALUE 
LOCAL_STORAGE_KEY_MAX_VALUE 

Definition at line 523 of file platform.h.

Constructor & Destructor Documentation

Thread ( const Options options)
explicit

Definition at line 587 of file platform-posix.cc.

References Thread::Options::name().

~Thread ( )
virtual

Definition at line 598 of file platform-posix.cc.

Member Function Documentation

Thread::LocalStorageKey CreateThreadLocalKey ( )
static

Definition at line 767 of file platform-posix.cc.

References ASSERT_EQ, v8::internal::NULL, and v8::internal::USE().

Referenced by Isolate::EnsureDefaultIsolate().

PlatformData* data ( )
inline

Definition at line 605 of file platform.h.

Referenced by RequestInterruptTestBase::InterruptThread::OnInterrupt().

void DeleteThreadLocalKey ( LocalStorageKey  key)
static

Definition at line 788 of file platform-posix.cc.

References ASSERT_EQ, and v8::internal::USE().

static void* GetExistingThreadLocal ( LocalStorageKey  key)
inlinestatic

Definition at line 591 of file platform.h.

References Thread::GetThreadLocal().

Referenced by Isolate::INLINE().

static int GetThreadLocalInt ( LocalStorageKey  key)
inlinestatic

Definition at line 572 of file platform.h.

References Thread::GetThreadLocal().

static bool HasThreadLocal ( LocalStorageKey  key)
inlinestatic

Definition at line 579 of file platform.h.

References Thread::GetThreadLocal(), and v8::internal::NULL.

const char* name ( ) const
inline

Definition at line 561 of file platform.h.

void NotifyStartedAndRun ( )
inline

Definition at line 607 of file platform.h.

References Thread::Run().

void SetThreadLocal ( LocalStorageKey  key,
void *  value 
)
static

Definition at line 802 of file platform-posix.cc.

References ASSERT_EQ, and v8::internal::USE().

Referenced by Isolate::EnsureDefaultIsolate(), and Thread::SetThreadLocalInt().

static void SetThreadLocalInt ( LocalStorageKey  key,
int  value 
)
inlinestatic

Definition at line 576 of file platform.h.

References Thread::SetThreadLocal().

void StartSynchronously ( )
inline

Definition at line 550 of file platform.h.

References v8::internal::NULL, and Thread::Start().

Referenced by SamplerThread::AddActiveSampler().

void YieldCPU ( )
static

Definition at line 679 of file platform-posix.cc.

References ASSERT_EQ, and v8::internal::USE().

Field Documentation

const int kMaxThreadNameLength = 16
static

Definition at line 602 of file platform.h.


The documentation for this class was generated from the following files: