MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / xh_core_refresh_thread_func

Function xh_core_refresh_thread_func

Bcore/src/main/cpp/xhook/xh_core.c:465–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465static void *xh_core_refresh_thread_func(void *arg)
466{
467 (void)arg;
468
469 pthread_setname_np(pthread_self(), "xh_refresh_loop");
470
471 while(xh_core_refresh_thread_running)
472 {
473 //waiting for a refresh task or exit
474 pthread_mutex_lock(&xh_core_mutex);
475 while(!xh_core_refresh_thread_do && xh_core_refresh_thread_running)
476 {
477 pthread_cond_wait(&xh_core_cond, &xh_core_mutex);
478 }
479 if(!xh_core_refresh_thread_running)
480 {
481 pthread_mutex_unlock(&xh_core_mutex);
482 break;
483 }
484 xh_core_refresh_thread_do = 0;
485 pthread_mutex_unlock(&xh_core_mutex);
486
487 //refresh
488 pthread_mutex_lock(&xh_core_refresh_mutex);
489 xh_core_refresh_impl();
490 pthread_mutex_unlock(&xh_core_refresh_mutex);
491 }
492
493 return NULL;
494}
495
496static void xh_core_init_once()
497{

Callers

nothing calls this directly

Calls 1

xh_core_refresh_implFunction · 0.85

Tested by

no test coverage detected