sc_process_handle.cc (12953:ddfd5e4643a9) sc_process_handle.cc (12960:ff77756883e0)
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

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

25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include "base/logging.hh"
31#include "systemc/core/process.hh"
32#include "systemc/core/scheduler.hh"
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

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

25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include "base/logging.hh"
31#include "systemc/core/process.hh"
32#include "systemc/core/scheduler.hh"
33#include "systemc/ext/core/sc_main.hh"
33#include "systemc/ext/core/sc_process_handle.hh"
34
35namespace sc_core
36{
37
38const char *
39sc_unwind_exception::what() const throw()
40{

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

287 return;
288 _gem5_process->syncResetOff(include_descendants == SC_INCLUDE_DESCENDANTS);
289}
290
291
292sc_process_handle
293sc_get_current_process_handle()
294{
34#include "systemc/ext/core/sc_process_handle.hh"
35
36namespace sc_core
37{
38
39const char *
40sc_unwind_exception::what() const throw()
41{

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

288 return;
289 _gem5_process->syncResetOff(include_descendants == SC_INCLUDE_DESCENDANTS);
290}
291
292
293sc_process_handle
294sc_get_current_process_handle()
295{
295 return sc_process_handle(::sc_gem5::scheduler.current());
296 if (sc_is_running())
297 return sc_process_handle(::sc_gem5::scheduler.current());
298 else
299 return sc_process_handle(::sc_gem5::Process::newest());
296}
297
298bool
299sc_is_unwinding()
300{
301 return sc_get_current_process_handle().is_unwinding();
302}
303
304bool sc_allow_process_control_corners;
305
306} // namespace sc_core
300}
301
302bool
303sc_is_unwinding()
304{
305 return sc_get_current_process_handle().is_unwinding();
306}
307
308bool sc_allow_process_control_corners;
309
310} // namespace sc_core