From f5f4173f034d3480be23a11a09db45d1c821fb1e Mon Sep 17 00:00:00 2001 From: zoujh Date: Fri, 17 Jun 2022 16:01:48 +0800 Subject: [PATCH] fix the incident trigger for sub-tasks --- SniperKernel/src/TaskTrigger.cc | 2 +- SniperKernel/src/WhiteBoard.cc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SniperKernel/src/TaskTrigger.cc b/SniperKernel/src/TaskTrigger.cc index e163d12..ea7ecb0 100644 --- a/SniperKernel/src/TaskTrigger.cc +++ b/SniperKernel/src/TaskTrigger.cc @@ -19,7 +19,7 @@ #include "SniperKernel/TaskWatchDog.h" TaskTrigger::TaskTrigger(ExecUnit* task) - : IIncidentHandler(task->getRoot()), + : IIncidentHandler(task->getParent()), m_dog(task->Snoopy()) { regist(task->objName()); diff --git a/SniperKernel/src/WhiteBoard.cc b/SniperKernel/src/WhiteBoard.cc index b3f472d..ac92de7 100644 --- a/SniperKernel/src/WhiteBoard.cc +++ b/SniperKernel/src/WhiteBoard.cc @@ -28,7 +28,9 @@ void WhiteBoard::mark(ExecUnit* task) if ( task->isRoot() ) { IncidentMgr::create(*task); } - s_wbObj.m_list.push_back( new TaskTrigger(task) ); + else { + s_wbObj.m_list.push_back( new TaskTrigger(task) ); + } } void WhiteBoard::clear()