sc_process_handle.hh (13087:1df34ed84a4b) sc_process_handle.hh (13128:60311a75e876)
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
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 "systemc/ext/core/sc_object.hh"
36#include "../utils/sc_report_handler.hh"
37#include "sc_object.hh"
37
38namespace sc_gem5
39{
40
41class Process;
42
43struct ProcessFuncWrapper
44{

--- 162 unchanged lines hidden (view full) ---

207 SC_NO_DESCENDANTS);
208
209 template <typename T>
210 void
211 throw_it(const T &user_defined_exception,
212 sc_descendent_inclusion_info include_descendants=
213 SC_NO_DESCENDANTS)
214 {
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 }
215 ::sc_gem5::ExceptionWrapper<T> exc(user_defined_exception);
216 ::sc_gem5::throw_it_wrapper(_gem5_process, exc,
217 include_descendants == SC_INCLUDE_DESCENDANTS);
218 }
219};
220
221sc_process_handle sc_get_current_process_handle();
222bool sc_is_unwinding();
223
224// Nonstandard
225// See Accellera's kernel/sim_context.cpp for an explanation of what this is
226// supposed to do. It essentially selects what happens during certain
227// undefined situations.
228extern bool sc_allow_process_control_corners;
229
230} // namespace sc_core
231
232#endif //__SYSTEMC_EXT_CORE_SC_PROCESS_HANDLE_HH__
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__