| 126 | } |
| 127 | |
| 128 | SYNC_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 | |
| 146 | void sync_timer_wakeup(SYNC_TIMER *timer, SYNC_OBJ *obj) |
| 147 | { |
no test coverage detected
searching dependent graphs…