本文整理汇总了C++中sc_process_handle::is_unwinding方法的典型用法代码示例。如果您正苦于以下问题:C++ sc_process_handle::is_unwinding方法的具体用法?C++ sc_process_handle::is_unwinding怎么用?C++ sc_process_handle::is_unwinding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sc_process_handle
的用法示例。
在下文中一共展示了sc_process_handle::is_unwinding方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: second_bystander
void second_bystander() // Gets reset by bystander
{
for (;;)
{
try {
wait(ev);
}
catch (const sc_unwind_exception& ex) {
cout << "sc_unwind_exception caught by second_bystander" << endl;
sc_assert( sc_time_stamp() == sc_time(35, SC_NS) );
sc_assert( ex.is_reset() == true );
sc_assert( !killing_over );
sc_assert( v.is_unwinding() ); // sic
sc_assert( b.is_unwinding() ); // sic
sc_assert( sc_is_unwinding() );
b3.kill();
throw ex;
}
}
}
示例2: target
void target()
{
cout << "Target called/reset at " << sc_time_stamp() << endl;
for (;;)
{
try {
wait(ev);
cout << "Target awoke at " << sc_time_stamp() << endl;
}
catch (const sc_unwind_exception& ex) {
cout << "Unwinding at " << sc_time_stamp() << endl;
sc_assert( t.is_unwinding() );
sc_assert( sc_is_unwinding() );
throw ex;
}
}
}
示例3: victim
void victim()
{
try {
while (true)
{
wait(1, SC_NS);
sc_assert( !sc_is_unwinding() );
}
}
catch (const sc_unwind_exception& ex)
{
cout << "sc_unwind_exception caught by victim" << endl;
sc_assert( sc_time_stamp() == sc_time(35, SC_NS) );
sc_assert( ex.is_reset() == false );
sc_assert( !killing_over );
sc_assert( v.is_unwinding() );
sc_assert( sc_is_unwinding() );
b.reset();
throw ex;
}
}
示例4: ticker
void ticker()
{
for (;;)
{
try {
wait(10, SC_NS);
ev.notify();
sc_assert( !sc_is_unwinding() );
}
catch (const sc_unwind_exception& ex)
{
// ticker process killed by target
cout << "sc_unwind_exception caught by ticker" << endl;
sc_assert( !ex.is_reset() );
sc_assert( count == 1 );
sc_assert( !killing_over );
sc_assert( t.is_unwinding() );
sc_assert( sc_is_unwinding() );
v.kill();
throw ex;
}
}
}