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


C++ Probe::enqueueDisable方法代码示例

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


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

示例1: handleEvent


//.........这里部分代码省略.........
              probe->enqueueNotifyPacket();
              probe->enqueueAction(curProcess, curThread);

            } else if(dom->getWaitTime() != Wait::NoWait) {
              if(!DysectAPI::SafeTimer::syncTimerRunning(probe)) {
                Err::verbose(true, "Start timer and enqueue: %x", dom->getId());
                DysectAPI::SafeTimer::startSyncTimer(probe);
              } else {
                Err::verbose(true, "Timer already running - just enqueue");
              }
              
              if(probe->doNotify()) {
                probe->enqueueNotifyPacket();
              }

              probe->enqueueAction(curProcess, curThread);

            } else { // No-wait probe

              if(probe->doNotify()) {
                probe->notifyTriggered();
              }

              probe->triggerAction(curProcess, curThread);

            }
            
            if(probe->waitForOthers()) {
              Err::verbose(true, "Wait for group members");
              probe->addWaitingProc(curProcess);

              if((dom->getWaitTime() == Wait::inf) && (probe->staticGroupWaiting())) {
                Err::verbose(true, "Sending enqueued notifications");
                
                if(probe->doNotify()) {
                  probe->sendEnqueuedNotifications();
                }
  
                probe->sendEnqueuedActions();
              }
            
              retState = Process::cbThreadStop;
            
            } else {
              Err::verbose(true, "Enable children for probe %x", dom->getId());
              probe->enqueueEnable(curProcess);

              //Err::verbose(true, "Stopping thread in process %d", curProcess->getPid());
              probe->addWaitingProc(curProcess);
              //retState = Process::cbThreadStop;
              retState = Process::cbProcStop;
            }

            if(probe->getLifeSpan() == fireOnce) {
              Err::verbose(true, "Requesting disablement of probe");
              probe->enqueueDisable(curProcess);

              //Err::verbose(true, "Stopping thread in process %d", curProcess->getPid());
              probe->addWaitingProc(curProcess);
              //retState = Process::cbThreadStop;
              retState = Process::cbProcStop;
            }
#if 0 
          } else if(result == CollectiveResolvable) {
            // Block process and await resolution of collective operations
            
            //probe->addWaitingCond(curProcess, curThread);
            Err::warn(false, "Condition stalls not yet supported");
            
            Err::verbose(true, "Stopping thread in process %d", curProcess->getPid());
            retState = Process::cbProcStop;

            //retState = Process::cbThreadStop;
#endif
          } else if(result == ResolvedFalse) {
              if(probe->getLifeSpan() == fireOnce) {
                Err::verbose(true, "Requesting disablement of probe");
                // Get out of the way
                probe->enqueueDisable(curProcess);
                retState = Process::cbProcStop;

              } else {

                retState = Process::cbProcContinue;
                //probe->addWaitingProc(curProcess);
              }

              // probe->addWaitingProc(curProcess);
          }

        } else {
          Err::warn(false, "Could not evaluate conditions for probe");
        }
      }

    }
  }

  return retState;
}
开发者ID:LLNL,项目名称:DysectAPI,代码行数:101,代码来源:backend.cpp


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