Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Additional agent worker thread for CPU simulation

Hello,

It is not safe to send events from your simulation thread; all events must be sent from the dispatch thread. One solution to solve this is use "post_event(send_context_xxx)" from your simulation thread to make sure that all events are sent from the dispatch thread and you need to add proper synchronization between the dispatch thread and your simulation thread.

Another solution would be to make your simulation thread the TCF dispatch thread (you need to call the init of the TCF agent from this thread) but this is more complex to implement (it may not even be possible depending on your simulator implementation) and the handling of TCF packets not related to debug would also slow down your simulation.

Didier

Hi,

The CPU simulator (that I would like to integrate with the agent) requires a separate thread to run the simulation. Is it save to send events from this thread? In particular, are send_context_started_event() and send_context_stopped events() thread save? If not, what would be the preferred way to run a simulation?

Cheers,
Conny

_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tcf-dev


Back to the top