MCPcopy Create free account
hub / github.com/acl-dev/acl / sync_timer_get

Function sync_timer_get

lib_fiber/c/src/sync/sync_timer.c:128–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128SYNC_TIMER *sync_timer_get(void)
129{
130 SYNC_TIMER *timer;
131
132 if (pthread_once(&__once_control, thread_init) != 0) {
133 abort();
134 }
135
136 timer = (SYNC_TIMER*) pthread_getspecific(__timer_key);
137 if (timer == NULL) {
138 timer = sync_timer_new();
139 pthread_setspecific(__timer_key, timer);
140 timer->fb = acl_fiber_create(fiber_waiting, timer, 320000);
141 }
142
143 return timer;
144}
145
146void sync_timer_wakeup(SYNC_TIMER *timer, SYNC_OBJ *obj)
147{

Callers 1

fiber_cond_timedwaitFunction · 0.85

Calls 5

pthread_onceFunction · 0.85
pthread_getspecificFunction · 0.85
sync_timer_newFunction · 0.85
pthread_setspecificFunction · 0.85
acl_fiber_createFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…