CACAO
Public Member Functions | Static Public Member Functions
GCCriticalSection Class Reference

Critical section for the GC. More...

Public Member Functions

 GCCriticalSection ()
 
 ~GCCriticalSection ()
 

Static Public Member Functions

static void enter ()
 Enters a LLNI critical section which prevents the GC from moving objects around on the collected heap. More...
 
static void leave ()
 Leaves a LLNI critical section and allows the GC to move objects around on the collected heap again. More...
 
static bool inside ()
 Checks if the calling thread is inside a GC critical section. More...
 

Detailed Description

Critical section for the GC.

Definition at line 42 of file gc.hpp.

Constructor & Destructor Documentation

GCCriticalSection::GCCriticalSection ( )
inline

Definition at line 44 of file gc.hpp.

GCCriticalSection::~GCCriticalSection ( )
inline

Definition at line 45 of file gc.hpp.

Member Function Documentation

void GCCriticalSection::enter ( )
inlinestatic

Enters a LLNI critical section which prevents the GC from moving objects around on the collected heap.

There are no race conditions possible while entering such a critical section, because each thread only modifies its own thread local flag and the GC reads the flags while the world is stopped.

Definition at line 60 of file gc.hpp.

bool GCCriticalSection::inside ( )
inlinestatic

Checks if the calling thread is inside a GC critical section.

Returns
true if inside, false otherwise.

Definition at line 94 of file gc.hpp.

void GCCriticalSection::leave ( )
inlinestatic

Leaves a LLNI critical section and allows the GC to move objects around on the collected heap again.

Definition at line 76 of file gc.hpp.


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