Skip to content

Commit

Permalink
Added missing attachInterceptTool() call to SSTHandlerBase. Also adde…
Browse files Browse the repository at this point in the history
…d printf in sst_exit to suppress unused variable warning. (sstsimulator#1188)
  • Loading branch information
feldergast authored Dec 20, 2024
1 parent 6775737 commit 357aa44
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sst/core/simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,9 @@ SST_Exit(int exit_code)
static int exit_once = (exit(exit_code), 0);
#endif

// Should never get here
// Should never get here, but need to use exit_once to avoid
// compiler warning
printf("exit_once = %d\n", exit_once);
std::terminate();
}

Expand Down
15 changes: 15 additions & 0 deletions src/sst/core/ssthandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,21 @@ class SSTHandlerBase<void, argT> : public SST::Core::Serialization::serializable
attached_tools->attach_tools.push_back(std::make_pair(tool, key));
}

/**
Attaches a tool to the AttachPoint
@param tool Tool to attach
@param mdata Metadata to pass to the tool
*/
void attachInterceptTool(InterceptPoint* tool, const AttachPointMetaData& mdata)
{
if ( !attached_tools ) attached_tools = new ToolList();

auto key = tool->registerHandlerIntercept(mdata);
attached_tools->intercept_tools.push_back(std::make_pair(tool, key));
}

/**
Transfers attached tools from existing handler
*/
Expand Down

0 comments on commit 357aa44

Please sign in to comment.