Pol  Revision:cb584c9
Pol::Core::ScriptScheduler Class Reference

#include <script_internals.h>

+ Inheritance diagram for Pol::Core::ScriptScheduler:

Classes

struct  Memory
 

Public Member Functions

 ScriptScheduler ()
 
 ~ScriptScheduler ()
 
void deinitialize ()
 
void enqueue (UOExecutor *exec)
 
Memory estimateSize () const
 
bool find_exec (unsigned int pid, UOExecutor **exec)
 
void free_pid (unsigned int pid)
 
unsigned int get_new_pid (UOExecutor *exec)
 
const HoldListgetHoldlist ()
 
const NoTimeoutHoldListgetNoTimeoutHoldlist ()
 
const PidListgetPidlist ()
 
const ExecListgetRanlist ()
 
const ExecListgetRunlist ()
 
void revive_debugged (UOExecutor *exec)
 
void revive_notimeout (UOExecutor *exec)
 
void revive_timeout (UOExecutor *exec, TimeoutHandle hold_itr)
 
void run_ready ()
 
void schedule (UOExecutor *exec)
 

Public Attributes

int priority_divide
 
ScriptStorage scrstore
 

Static Public Attributes

static const unsigned int PID_MIN = 0x01000000
 

Private Attributes

NoTimeoutHoldList debuggerholdlist
 
HoldList holdlist
 
unsigned int next_pid
 
NoTimeoutHoldList notimeoutholdlist
 
PidList pidlist
 
ExecList ranlist
 
ExecList runlist
 

Detailed Description

Definition at line 27 of file script_internals.h.

Constructor & Destructor Documentation

Pol::Core::ScriptScheduler::ScriptScheduler ( )

Definition at line 25 of file script_internals.cpp.

Pol::Core::ScriptScheduler::~ScriptScheduler ( )

Definition at line 38 of file script_internals.cpp.

Member Function Documentation

void Pol::Core::ScriptScheduler::deinitialize ( )
void Pol::Core::ScriptScheduler::enqueue ( UOExecutor exec)
inline

Definition at line 134 of file script_internals.h.

References runlist.

Referenced by revive_debugged(), revive_notimeout(), revive_timeout(), and schedule().

bool Pol::Core::ScriptScheduler::find_exec ( unsigned int  pid,
UOExecutor **  exec 
)

Definition at line 308 of file script_internals.cpp.

References pidlist.

Referenced by Pol::Core::find_uoexec().

void Pol::Core::ScriptScheduler::free_pid ( unsigned int  pid)
inline

Definition at line 139 of file script_internals.h.

References pidlist, and Pol::Core::scriptScheduler.

Referenced by Pol::Module::freepid().

unsigned int Pol::Core::ScriptScheduler::get_new_pid ( UOExecutor exec)

Definition at line 287 of file script_internals.cpp.

References next_pid, PID_MIN, and pidlist.

Referenced by Pol::Module::getnewpid().

const NoTimeoutHoldList & Pol::Core::ScriptScheduler::getNoTimeoutHoldlist ( )
inline
const PidList & Pol::Core::ScriptScheduler::getPidlist ( )
inline

Definition at line 111 of file script_internals.h.

References pidlist.

Referenced by Pol::Core::DebugContext::cmd_pidlist().

void Pol::Core::ScriptScheduler::revive_debugged ( UOExecutor exec)
inline

Definition at line 116 of file script_internals.h.

References debuggerholdlist, and enqueue().

Referenced by Pol::Module::OSExecutorModule::revive_debugged().

void Pol::Core::ScriptScheduler::revive_notimeout ( UOExecutor exec)
inline

Definition at line 128 of file script_internals.h.

References enqueue(), and notimeoutholdlist.

Referenced by Pol::Module::OSExecutorModule::revive().

void Pol::Core::ScriptScheduler::revive_timeout ( UOExecutor exec,
TimeoutHandle  hold_itr 
)
inline

Definition at line 122 of file script_internals.h.

References enqueue(), and holdlist.

Referenced by Pol::Module::OSExecutorModule::revive().

void Pol::Core::ScriptScheduler::run_ready ( )

Definition at line 131 of file script_internals.cpp.

References Pol::Module::OSExecutorModule::blocked(), Pol::Plib::SystemState::config, Pol::Module::OSExecutorModule::critical, Pol::Module::OSExecutorModule::DEBUGGER_LIST, debuggerholdlist, Pol::Bscript::Executor::done, Pol::Bscript::Executor::error(), ERROR_PRINT, Pol::Bscript::Executor::execInstr(), Pol::Module::OSExecutorModule::hold_itr_, holdlist, Pol::Module::OSExecutorModule::in_hold_list_, Pol::Core::UOExecutor::instr_cycles, Pol::Module::OSExecutorModule::NOTIMEOUT_LIST, notimeoutholdlist, Pol::Core::UOExecutor::os_module, passert_paranoid, Pol::Bscript::Executor::PC, Pol::Core::UOExecutor::pChild, Pol::Module::OSExecutorModule::pid(), Pol::Core::UOExecutor::pParent, Pol::Module::OSExecutorModule::priority, priority_divide, Pol::Core::StateManager::profilevars, ranlist, Pol::Module::OSExecutorModule::revive(), Pol::Core::UOExecutor::runaway_cycles, Pol::Core::PolConfig::runaway_script_threshold, runlist, Pol::Bscript::Executor::runnable(), SCRIPTLOG, Pol::Bscript::Executor::scriptname(), Pol::Clib::scripts_thread_script, Pol::Clib::scripts_thread_scriptPC, Pol::Bscript::Executor::show_context(), Pol::Core::UOExecutor::sleep_cycles, Pol::Core::ProfileVars::sleep_cycles, Pol::Module::OSExecutorModule::sleep_until_clock_, Pol::Core::stateManager, Pol::Plib::systemstate, THREAD_CHECKPOINT, Pol::Module::OSExecutorModule::TIMEOUT_LIST, Pol::Module::OSExecutorModule::warn_on_runaway, and Pol::Core::UOExecutor::warn_runaway_on_cycle.

Referenced by Pol::Core::run_ready().

void Pol::Core::ScriptScheduler::schedule ( UOExecutor exec)

Member Data Documentation

NoTimeoutHoldList Pol::Core::ScriptScheduler::debuggerholdlist
private

Definition at line 89 of file script_internals.h.

Referenced by deinitialize(), estimateSize(), revive_debugged(), and run_ready().

HoldList Pol::Core::ScriptScheduler::holdlist
private

Definition at line 87 of file script_internals.h.

Referenced by deinitialize(), estimateSize(), getHoldlist(), revive_timeout(), and run_ready().

unsigned int Pol::Core::ScriptScheduler::next_pid
private

Definition at line 92 of file script_internals.h.

Referenced by get_new_pid().

NoTimeoutHoldList Pol::Core::ScriptScheduler::notimeoutholdlist
private
const unsigned int Pol::Core::ScriptScheduler::PID_MIN = 0x01000000
static
PidList Pol::Core::ScriptScheduler::pidlist
private

Definition at line 91 of file script_internals.h.

Referenced by estimateSize(), find_exec(), free_pid(), get_new_pid(), and getPidlist().

int Pol::Core::ScriptScheduler::priority_divide
ExecList Pol::Core::ScriptScheduler::ranlist
private

Definition at line 86 of file script_internals.h.

Referenced by estimateSize(), getRanlist(), and run_ready().

ExecList Pol::Core::ScriptScheduler::runlist
private

Definition at line 85 of file script_internals.h.

Referenced by deinitialize(), enqueue(), estimateSize(), getRunlist(), and run_ready().


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