sc_simcontext.cpp の 174 行で定義されています。
sc_core::sc_process_table::sc_process_table | ( | ) |
sc_simcontext.cpp の 201 行で定義されています。
00201 : 00202 m_cthread_q(0), m_method_q(0), m_thread_q(0) 00203 {}
sc_core::sc_process_table::~sc_process_table | ( | ) |
sc_simcontext.cpp の 205 行で定義されています。
00206 { 00207 00208 sc_method_handle method_next_p; // Next method to delete. 00209 sc_method_handle method_now_p; // Method now deleting. 00210 00211 for( method_now_p = m_method_q; method_now_p; method_now_p = method_next_p ) 00212 { 00213 method_next_p = method_now_p->next_exist(); 00214 delete method_now_p; 00215 } 00216 00217 if ( m_thread_q || m_cthread_q ) 00218 { 00219 ::std::cout << ::std::endl 00220 << "WATCH OUT!! In sc_process_table destructor. " 00221 << "Threads and cthreads are not actually getting deleted here. " 00222 << "Some memory may leak. Look at the comments here in " 00223 << "kernel/sc_simcontext.cpp for more details." 00224 << ::std::endl; 00225 } 00226 00227 // don't delete threads and cthreads. If a (c)thread 00228 // has died, then it has already been deleted. Only (c)threads created 00229 // before simulation-start are in this table. Due to performance 00230 // reasons, we don't look up the dying thread in the process table 00231 // and remove it from there. simcontext::reset and ~simcontext invoke this 00232 // destructor. At present none of these routines are ever invoked. 00233 // We can delete threads and cthreads here if a dying thread figured out 00234 // it was created before simulation-start and took itself off the 00235 // process_table. 00236 00237 #if 0 00238 sc_cthread_handle cthread_next_p; // Next cthread to delete. 00239 sc_cthread_handle cthread_now_p; // Cthread now deleting. 00240 sc_thread_handle thread_next_p; // Next thread to delete. 00241 sc_thread_handle thread_now_p; // Thread now deleting. 00242 00243 for(cthread_now_p=m_cthread_q; cthread_now_p; cthread_now_p=cthread_next_p) 00244 { 00245 cthread_next_p = cthread_now_p->next_exist(); 00246 delete cthread_now_p; 00247 } 00248 00249 for( thread_now_p=m_thread_q; thread_now_p; thread_now_p=thread_next_p ) 00250 { 00251 thread_next_p = thread_now_p->next_exist(); 00252 delete thread_now_p; 00253 } 00254 #endif // 0 00255 }
void sc_core::sc_process_table::push_front | ( | sc_method_handle | handle_ | ) | [inline] |
sc_simcontext.cpp の 273 行で定義されています。
00274 { 00275 handle_->set_next_exist(m_method_q); 00276 m_method_q = handle_; 00277 }
void sc_core::sc_process_table::push_front | ( | sc_thread_handle | handle_ | ) | [inline] |
sc_simcontext.cpp の 281 行で定義されています。
00282 { 00283 handle_->set_next_exist(m_thread_q); 00284 m_thread_q = handle_; 00285 }
void sc_core::sc_process_table::push_front | ( | sc_cthread_handle | handle_ | ) | [inline] |
sc_simcontext.cpp の 289 行で定義されています。
00290 { 00291 handle_->set_next_exist(m_cthread_q); 00292 m_cthread_q = handle_; 00293 }
sc_cthread_handle sc_core::sc_process_table::cthread_q_head | ( | ) | [inline] |
sc_method_handle sc_core::sc_process_table::method_q_head | ( | ) | [inline] |
sc_cthread_handle sc_core::sc_process_table::remove | ( | sc_cthread_handle | handle_ | ) |
sc_simcontext.cpp の 297 行で定義されています。
00298 { 00299 sc_cthread_handle now_p; // Entry now examining. 00300 sc_cthread_handle prior_p; // Entry prior to one now examining. 00301 00302 prior_p = 0; 00303 for ( now_p = m_cthread_q; now_p; now_p = now_p->next_exist() ) 00304 { 00305 if ( now_p == handle_ ) 00306 { 00307 if ( prior_p ) 00308 prior_p->set_next_exist( now_p->next_exist() ); 00309 else 00310 m_cthread_q = now_p->next_exist(); 00311 return handle_; 00312 } 00313 } 00314 return 0; 00315 }
sc_method_handle sc_core::sc_process_table::remove | ( | sc_method_handle | handle_ | ) |
sc_simcontext.cpp の 318 行で定義されています。
00319 { 00320 sc_method_handle now_p; // Entry now examining. 00321 sc_method_handle prior_p; // Entry prior to one now examining. 00322 00323 prior_p = 0; 00324 for ( now_p = m_method_q; now_p; now_p = now_p->next_exist() ) 00325 { 00326 if ( now_p == handle_ ) 00327 { 00328 if ( prior_p ) 00329 prior_p->set_next_exist( now_p->next_exist() ); 00330 else 00331 m_method_q = now_p->next_exist(); 00332 return handle_; 00333 } 00334 } 00335 return 0; 00336 }
sc_thread_handle sc_core::sc_process_table::remove | ( | sc_thread_handle | handle_ | ) |
sc_simcontext.cpp の 339 行で定義されています。
00340 { 00341 sc_thread_handle now_p; // Entry now examining. 00342 sc_thread_handle prior_p; // Entry prior to one now examining. 00343 00344 prior_p = 0; 00345 for ( now_p = m_thread_q; now_p; now_p = now_p->next_exist() ) 00346 { 00347 if ( now_p == handle_ ) 00348 { 00349 if ( prior_p ) 00350 prior_p->set_next_exist( now_p->next_exist() ); 00351 else 00352 m_thread_q = now_p->next_exist(); 00353 return handle_; 00354 } 00355 } 00356 return 0; 00357 }
sc_thread_handle sc_core::sc_process_table::thread_q_head | ( | ) | [inline] |
sc_simcontext.cpp の 193 行で定義されています。
sc_simcontext.cpp の 194 行で定義されています。
sc_simcontext.cpp の 195 行で定義されています。