12 #ifndef SSTMAC_SOFTWARE_PROCESS_operatingsystem_H_INCLUDED 13 #define SSTMAC_SOFTWARE_PROCESS_operatingsystem_H_INCLUDED 74 #if SSTMAC_USE_MULTITHREAD 76 return os_thread_contexts_[thr];
205 lib(
const std::string& name)
const;
239 print_libs(std::ostream& os = std::cout)
const;
285 sprockit::sim_parameters*
327 spkt_unordered_map<std::string, library*>
libs_;
364 #if SSTMAC_USE_MULTITHREAD 365 static std::vector<operating_system::os_thread_context> os_thread_contexts_;
371 #if SSTMAC_SANITY_CHECK 372 std::set<key*> valid_keys_;
void execute_kernel(ami::COMM_FUNC func, message *data)
execute Execute a compute function.
void print_libs(std::ostream &os=std::cout) const
std::list< api * > services_
A class describing an event.
sprockit::sim_parameters * params() const
virtual void init_factory_params(sprockit::sim_parameters *params)
void add_application(app *a)
thread_data_t current_context() const
static os_thread_context & static_os_thread_context()
app * app_ptr(software_id sid)
SERVICE_FUNC
Functions that do not block and should return asynchronously.
COMP_FUNC
Functions that block and must complete before returning.
void set_addr(node_id addr)
spkt_unordered_map< library *, int > lib_refcounts_
os_thread_context & current_os_thread_context()
static size_t stacksize()
sprockit::sim_parameters * params_
static operating_system::os_thread_context os_thread_context_
spkt_unordered_map< void *, std::list< library * > > libs_by_owner_
std::stack< thread_data_t > threadstack_
void set_node(sstmac::hw::node *n)
A management type to handle dividing mmap-ed memory for use as ucontext stack(s). ...
void init_loc_id(event_loc_id id)
void start_thread(thread *t)
void async_kernel(ami::SERVICE_FUNC func, event *data)
execute Enqueue an operation to perform This function takes place in "kernel" land and will never blo...
long current_threadid() const
static void delete_statics()
std::list< app * > app_ptrs(app_id aid)
The app derived class adds to the thread base class by providing facilities to allow applications to ...
std::list< thread * > threads_
void free_thread_stack(void *stack)
void join_thread(thread *t)
event_trace * event_trace_
compute_scheduler * compute_sched_
spkt_unordered_set< std::string > deleted_libs_
virtual void finalize_init()
void register_lib(void *owner, library *lib)
void execute(ami::COMP_FUNC, event *data, key::category cat=key::general)
execute Execute a compute function.
virtual ~operating_system()
static node_id remote_node(int tid)
A basic container for time (subject to future transplant).
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
timestamp unblock(key *req)
void unregister_lib(library *lib)
static void switch_to_context(int aid, int tid)
static bool cxa_finalizing_
timestamp block(key *req)
std::vector< std::string > startup_libs_
static library * current_library(const std::string &name)
static operating_system * construct(sprockit::sim_parameters *params)
static os_thread_context cxa_finalize_context_
A base type and default (empty) implementation of a handle to block and unblock processes.
static void stack_check()
void switch_to_thread(thread_data_t tothread)
ftq_calendar * ftq_trace_
std::queue< thread * > to_awake_
void handle_event(event *ev)
static node_id current_node_id()
The interface for something that can schedule messages.
static void simulation_done()
operating_system * current_os
library * lib(const std::string &name) const
static graph_viz * call_graph_
threading_interface * des_context_
The caller context (main DES thread).
std::list< thread * > to_delete
spkt_unordered_map< task_id, long > task_to_thread_
void set_ncores(int ncores, int nsocket)
void set_event_parent(event_scheduler *man)
Set the eventmanager for this scheduler.
std::pair< threading_interface *, thread * > thread_data_t
void schedule_timeout(timestamp delay, key *k)
A wrapper for an appid, taskid pair.
static int current_physical_thread_id()
void complete_thread(bool succ)
void compute(timestamp t)
void unregister_all_libs(void *owner)
void add_thread(thread *t)
spkt_unordered_map< std::string, library * > libs_
void execute(ami::COMM_FUNC func, message *data)
execute Execute a communication function.