示例#1
0
bool ResCache::init() {
	bool retValue = true;

	for( ResourceFiles::iterator fileItr = m_files.begin(); fileItr != m_files.end(); ++fileItr ) {
		if( !(*fileItr)->VOpen() ) {
			GEN_FATAL("unable to load filename: " + (*fileItr)->VGetResourceFileName());
			retValue = false;
		}
	}

	if( retValue )
		registerLoader(std::shared_ptr<IResourceLoader>(new DefaultResourceLoader()));

	return retValue;
}//ResCache::init
pthread_t* start_thread_control (C_TaskControl *P_taskControl) {

  pthread_t      *L_thread     ;
  int             L_return     ;

  GEN_DEBUG(0, "start_thread_control() start");
  ALLOC_VAR(L_thread, pthread_t*, sizeof(pthread_t));

  L_return = pthread_create (L_thread, 
 			     NULL, 
 			     call_run,
 			     (void*) P_taskControl) ;

  if (L_return != 0) {
    GEN_FATAL(E_GEN_FATAL_ERROR, "pthread_create() error");
  }

  GEN_DEBUG(0, "start_controller() end");
  return (L_thread);
}