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 --- 25 unchanged lines hidden (view full) --- 34#include "systemc/core/scheduler.hh" 35 36namespace sc_gem5 37{ 38 39class Method : public Process 40{ 41 public: |
42 Method(const char *name, ProcessFuncWrapper *func) : Process(name, func) {} |
43 44 const char *kind() const override { return "sc_method_process"; } 45 46 sc_core::sc_curr_proc_kind 47 procKind() const override 48 { 49 return sc_core::SC_METHOD_PROC_; 50 } 51}; 52 53class Thread : public Process 54{ 55 public: |
56 Thread(const char *name, ProcessFuncWrapper *func) : 57 Process(name, func), ctx(nullptr) |
58 {} 59 60 ~Thread() { delete ctx; } 61 62 const char *kind() const override { return "sc_thread_process"; } 63 64 void throw_it(ExceptionWrapperBase &exc, bool inc_kids) override; 65 --- 32 unchanged lines hidden (view full) --- 98 friend class Context; 99 100 Context *ctx; 101}; 102 103class CThread : public Thread 104{ 105 public: |
106 CThread(const char *name, ProcessFuncWrapper *func) : Thread(name, func) |
107 { 108 // We'll be in the initialization list now, but we shouldn't be. 109 popListNode(); 110 } 111 112 const char *kind() const override { return "sc_cthread_process"; } 113 114 sc_core::sc_curr_proc_kind 115 procKind() const override 116 { 117 return sc_core::SC_CTHREAD_PROC_; 118 } 119}; 120 121} // namespace sc_gem5 122 123#endif //__SYSTEMC_CORE_PROCESS_TYPES_HH__ |