ge_Thread* geCreateThread(const char* name, void* func, int flags) { ge_Thread* thread = (ge_Thread*)geMalloc(sizeof(ge_Thread)); if(!thread)return NULL; strcpy(thread->name, name); thread->priority = flags & 64; thread->flags = flags & 0xFFFFFF80; thread->func = func; if(thread->flags & GE_THREAD_SHARED_GRAPHIC_CONTEXT) { } else if(thread->flags & GE_THREAD_GRAPHIC_CONTEXT) { } RegisterThread(thread); return thread; }
ge_Thread* geCreateThread(const char* name, void* func, int flags){ ge_Thread* thread = (ge_Thread*)geMalloc(sizeof(ge_Thread)); if(!thread)return NULL; strcpy(thread->name, name); thread->priority = flags & 64; thread->flags = flags & 0xFFFFFF80; thread->func = func; if(thread->flags & GE_THREAD_SHARED_GRAPHIC_CONTEXT){ LibGE_LinuxContext* context = (LibGE_LinuxContext*)libge_context->syscontext; thread->graphic_ctx = (t_ptr)glXCreateContext(context->dpy, context->vi, context->ctx, true); }else if(thread->flags & GE_THREAD_GRAPHIC_CONTEXT){ } RegisterThread(thread); return thread; }
void Install() { int hangTimeoutSecs = configHandler->Get("HangTimeout", 0); //! HangTimeout = -1 to force disable hang detection if (hangTimeoutSecs < 0) return; if (hangTimeoutSecs == 0) hangTimeoutSecs = 10; hangTimeout = spring_secs(hangTimeoutSecs); //! register (this) mainthread RegisterThread("main"); //! start the watchdog thread hangdetectorthread = new boost::thread(&HangDetector); logOutput.Print("[Watchdog] Installed (timeout: %isec)", hangTimeoutSecs); }
void RegisterStart( void ) //Register init { RegisterInit(); RegisterThread(); }
void CBotThread::StartThread() { RegisterThread(); CreateThread(); }