StuBS
guard.cc File Reference
#include "interrupt/guard.h"
#include "machine/core.h"
#include "debug/assert.h"
#include "debug/output.h"
#include "sync/spinlock.h"
#include "object/percore.h"
Include dependency graph for guard.cc:

Namespaces

namespace  Guard
 Synchronizes the kernel with interrupts using the Prologue/Epilogue Model.
 

Functions

bool Guard::active ()
 Helper to check if we are currently in a guarded environment on this CPU core.
 
void Guard::enter ()
 Entering the critical section from level 0.
 
void Guard::leave ()
 Leaving the critical section.
 
void Guard::relay (Gate *item)
 A prologue wants its epilogue to be processed (entering from level 1).
 

Constants

PerCore< PerCoreQueue< Gate > > Guard::epilogue_queue
 Queue for Gates.
 
static Spinlock Guard::global_lock
 
static PerCore< int > Guard::core_lock (0)