5 #include "../../clib/logfacility.h" 6 #include "../../clib/passert.h" 7 #include "../../plib/systemstate.h" 8 #include "../module/osmod.h" 10 #include "../uoexec.h" 26 : priority_divide( 1 ),
50 delete ( ( *
holdlist.begin() ).second );
68 memset( &usage, 0,
sizeof( usage ) );
72 +
sizeof(
unsigned int )
73 + (
sizeof(
unsigned int ) +
sizeof(
UOExecutor* ) + (
sizeof(
void* ) * 3 + 1 ) / 2 ) *
76 for (
const auto& script :
scrstore )
80 if ( script.second.get() != nullptr )
87 for (
const auto& exec :
runlist )
89 if ( exec !=
nullptr )
95 for (
const auto& exec :
ranlist )
97 if ( exec !=
nullptr )
104 if ( hold.second !=
nullptr )
113 if ( hold !=
nullptr )
114 usage.
script_size += hold->sizeEstimate() + 3 *
sizeof(
void* );
121 if ( hold !=
nullptr )
122 usage.
script_size += hold->sizeEstimate() + 3 *
sizeof(
void* );
136 ExecList::iterator itr =
runlist.begin();
175 tmp <<
"Runaway script[" << os_module->
pid() <<
"]: " << ex->
scriptname() <<
" (" 187 if ( inscount > 1000 )
193 tmp <<
"Critical script " << ex->
scriptname() <<
" has run for " << totcount
194 <<
" instructions\n";
229 if ( ex->
pChild !=
nullptr )
310 auto itr =
pidlist.find( pid );
313 *exec = ( *itr ).second;
void setDebugLevel(DEBUG_LEVEL level)
std::string scripts_thread_script
Memory estimateSize() const
unsigned int runaway_script_threshold
void enqueue(UOExecutor *exec)
bool find_exec(unsigned int pid, UOExecutor **exec)
#define THREAD_CHECKPOINT(thread, check)
enum Pol::Module::OSExecutorModule::@9 in_hold_list_
NoTimeoutHoldList debuggerholdlist
NoTimeoutHoldList notimeoutholdlist
Core::TimeoutHandle hold_itr_
u64 warn_runaway_on_cycle
Core::polclock_t sleep_until_clock_
size_t scriptstorage_count
StateManager stateManager
size_t scriptstorage_size
ScriptScheduler scriptScheduler
unsigned int get_new_pid(UOExecutor *exec)
const std::string & scriptname() const
void schedule(UOExecutor *exec)
void show_context(unsigned atPC)
#define passert_paranoid(exp)
Module::OSExecutorModule * os_module
static const unsigned int PID_MIN
unsigned scripts_thread_scriptPC