|
void | jobs_handler () |
|
void | cancel_pendings_locked () |
|
|
std::thread::id | m_thread_id |
|
std::queue< AsyncJob::Ptr > | m_async_jobs |
|
AsyncJob::Ptr | m_running_job |
|
std::mutex | m_async_jobs_mutex |
|
async_event | m_jobs_handler_event |
|
std::atomic< bool > | running = true |
|
◆ cancel_all()
void gs::runonsysc::cancel_all |
( |
| ) |
|
|
inline |
Cancel all pending and running jobs.
@detail Cancel all the pending jobs and the currently running job. The callers will be unblocked if they are waiting for the job. Note that if the currently running job is resumed, the behaviour is undefined. This method is meant to be called after simulation has ended.
◆ cancel_pendings()
void gs::runonsysc::cancel_pendings |
( |
| ) |
|
|
inline |
Cancel all pending jobs.
@detail Cancel all the pending jobs. The callers will be unblocked if they are waiting for the job.
◆ is_on_sysc()
bool gs::runonsysc::is_on_sysc |
( |
| ) |
const |
|
inline |
- Returns
- Whether we are on SystemC thread
◆ run_on_sysc()
bool gs::runonsysc::run_on_sysc |
( |
std::function< void()> |
job_entry, |
|
|
bool |
wait = true |
|
) |
| |
|
inline |
Run a job on the SystemC kernel thread.
- Parameters
-
[in] | job_entry | The job to run |
[in] | wait | If true, wait for job completion |
- Returns
- true if the job has been succesfully executed or if
wait
was false, false if it has been cancelled (see RunOnSysC::cancel_all
).
The documentation for this class was generated from the following file: