#include <during-ondemand.h>
Public Member Functions | |
void | extra_time (const sc_core::sc_time &t) |
void | catch_up (const sc_core::sc_time &t) |
void | sc_call (const boost::function< void()> &f) |
void | during (const sc_core::sc_time &time, const boost::function< void()> &routine) |
mode | get_mode () |
Implementation of during creating threads on demand.
By default, no thread is created. On first call to during(), a thread is created, and it is reused by further calls to during().
Definition at line 24 of file during-ondemand.h.
void sc_during_ondemand::catch_up | ( | const sc_core::sc_time & | t | ) | [virtual] |
Blocks the current task until the SystemC time has reached the end of the task, minus t.
If t == 0, this means wait until the SystemC time has reached the end of this task.
Implements sc_during_if.
Definition at line 34 of file during-ondemand.cpp.
void sc_during_ondemand::during | ( | const sc_core::sc_time & | time, | |
const boost::function< void()> & | routine | |||
) | [virtual] |
Create a "during task" of duration time, executing the function routine.
The function routine may be executed as a separate OS thread, and is not allowed to execute SystemC primitives like wait or notify().
Implements sc_during_if.
Definition at line 42 of file during-ondemand.cpp.
void sc_during_ondemand::extra_time | ( | const sc_core::sc_time & | t | ) | [virtual] |
Increase duration of current task by t
Implements sc_during_if.
Definition at line 30 of file during-ondemand.cpp.
void sc_during_ondemand::sc_call | ( | const boost::function< void()> & | f | ) | [virtual] |
Call the function f in the context of SystemC. Unlike the during task, f is allowed to access shared variables without locking, to call SystemC primitives like notify() or wait().
Implements sc_during_if.
Definition at line 38 of file during-ondemand.cpp.