当前位置: 首页>>代码示例>>C++>>正文


C++ statet::switch_to_thread方法代码示例

本文整理汇总了C++中statet::switch_to_thread方法的典型用法代码示例。如果您正苦于以下问题:C++ statet::switch_to_thread方法的具体用法?C++ statet::switch_to_thread怎么用?C++ statet::switch_to_thread使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在statet的用法示例。


在下文中一共展示了statet::switch_to_thread方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: operator

void goto_symext::operator()(
  statet &state,
  const goto_functionst &goto_functions,
  const goto_programt &goto_program)
{
  assert(!goto_program.instructions.empty());

  state.source=symex_targett::sourcet(goto_program);
  assert(!state.threads.empty());
  assert(!state.call_stack().empty());
  state.top().end_of_function=--goto_program.instructions.end();
  state.top().calling_location.pc=state.top().end_of_function;
  state.symex_target=⌖
  state.dirty=new dirtyt(goto_functions);

  assert(state.top().end_of_function->is_end_function());

  while(!state.call_stack().empty())
  {
    symex_step(goto_functions, state);

    // is there another thread to execute?
    if(state.call_stack().empty() &&
       state.source.thread_nr+1<state.threads.size())
    {
      unsigned t=state.source.thread_nr+1;
      // std::cout << "********* Now executing thread " << t << std::endl;
      state.switch_to_thread(t);
    }
  }

  delete state.dirty;
  state.dirty=0;
}
开发者ID:dcattaruzza,项目名称:cbmc,代码行数:34,代码来源:symex_main.cpp


注:本文中的statet::switch_to_thread方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。