34 #ifndef SC_COR_PTHREAD_H 35 #define SC_COR_PTHREAD_H 38 #if defined(SC_USE_PTHREADS) 46 class sc_cor_pkg_pthread;
61 class sc_cor_pthread :
public sc_cor
69 virtual ~sc_cor_pthread();
72 static void* invoke_module_method(
void* context_p );
75 static sc_cor_pthread* m_active_cor_p;
80 pthread_mutex_t m_mutex;
81 sc_cor_pkg_pthread* m_pkg_p;
82 pthread_cond_t m_pt_condition;
88 sc_cor_pthread(
const sc_cor_pthread& );
89 sc_cor_pthread& operator = (
const sc_cor_pthread& );
99 class sc_cor_pkg_pthread
108 virtual ~sc_cor_pkg_pthread();
111 virtual sc_cor* create( std::size_t stack_size,
sc_cor_fn* fn,
void* arg );
114 virtual void yield( sc_cor* next_cor );
117 virtual void abort( sc_cor* next_cor );
120 virtual sc_cor* get_main();
124 static int instance_count;
129 sc_cor_pkg_pthread();
130 sc_cor_pkg_pthread(
const sc_cor_pkg_pthread& );
131 sc_cor_pkg_pthread& operator = (
const sc_cor_pkg_pthread& );
159 #endif // defined(SC_USE_PTHREADS)
Coroutine abstract base classes.
sc_cor_pkg_qt sc_cor_pkg_t
void() sc_cor_fn(void *)
Function type for creating coroutines.
class SC_API sc_simcontext