1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 19 unchanged lines hidden (view full) --- 28 */ 29 30#ifndef __SYSTEMC_EXT_CORE_SC_PROCESS_HANDLE_HH__ 31#define __SYSTEMC_EXT_CORE_SC_PROCESS_HANDLE_HH__ 32 33#include <exception> 34#include <vector> 35 |
36#include "../utils/sc_report_handler.hh" 37#include "sc_object.hh" |
38 39namespace sc_gem5 40{ 41 42class Process; 43 44struct ProcessFuncWrapper 45{ --- 162 unchanged lines hidden (view full) --- 208 SC_NO_DESCENDANTS); 209 210 template <typename T> 211 void 212 throw_it(const T &user_defined_exception, 213 sc_descendent_inclusion_info include_descendants= 214 SC_NO_DESCENDANTS) 215 { |
216 if (!_gem5_process) { 217 SC_REPORT_WARNING("(W570) attempt to use an empty " 218 "process handle ignored", "throw_it()"); 219 return; 220 } |
221 ::sc_gem5::ExceptionWrapper<T> exc(user_defined_exception); 222 ::sc_gem5::throw_it_wrapper(_gem5_process, exc, 223 include_descendants == SC_INCLUDE_DESCENDANTS); 224 } 225}; 226 227sc_process_handle sc_get_current_process_handle(); 228bool sc_is_unwinding(); 229 230// Nonstandard 231// See Accellera's kernel/sim_context.cpp for an explanation of what this is 232// supposed to do. It essentially selects what happens during certain 233// undefined situations. 234extern bool sc_allow_process_control_corners; 235 236} // namespace sc_core 237 238#endif //__SYSTEMC_EXT_CORE_SC_PROCESS_HANDLE_HH__ |