Lines Matching refs:osi_info

42     if (osi_info.timer[index].state == OSI_FREE) {  in OSI_timer_allocate()
44 free_timer = (tOSI_TIMER_HANDLER)&osi_info.timer[index]; in OSI_timer_allocate()
46 if ((char const*)osi_info.timer[index].name == NULL) continue; in OSI_timer_allocate()
48 if (strcmp((char const*)osi_info.timer[index].name, in OSI_timer_allocate()
97 if (osi_info.usingTimer < 1) { in OSI_timer_start()
98 osi_info.timer_thread_flag |= OSI_TIMER_THREAD_FLAG_DETACH; in OSI_timer_start()
100 osi_info.usingTimer++; in OSI_timer_start()
108 ret_th = pthread_create(&osi_info.timer_thread, &attr, in OSI_timer_start()
120 osi_info.usingTimer++; in OSI_timer_start()
137 osi_info.usingTimer--; in OSI_timer_stop()
138 if (osi_info.usingTimer <= 0) { in OSI_timer_stop()
140 osi_info.timer_thread_flag &= ~OSI_TIMER_THREAD_FLAG_DETACH; in OSI_timer_stop()
142 pthread_join(osi_info.timer_thread, NULL); in OSI_timer_stop()
152 if (timer->state == OSI_RUN) osi_info.usingTimer--; in OSI_timer_free()
171 if ((char const*)osi_info.timer[index].name == NULL) continue; in OSI_timer_get_handler()
173 if (strcmp((char const*)osi_info.timer[index].name, (char const*)name) == in OSI_timer_get_handler()
175 timer = &osi_info.timer[index]; in OSI_timer_get_handler()
205 if (osi_info.usingTimer <= 0) { in OSI_timer_update()
211 if (osi_info.timer[index].state == OSI_RUN) { in OSI_timer_update()
212 osi_info.timer[index].timeout -= tick; in OSI_timer_update()
214 if (osi_info.timer[index].timeout <= 0) { in OSI_timer_update()
216 if (((OSI_timer_get_current_time() - osi_info.timer[index].exact_time) > in OSI_timer_update()
217 osi_info.timer[index].init_timeout) || in OSI_timer_update()
218 (OSI_timer_get_current_time() < osi_info.timer[index].exact_time)) in OSI_timer_update()
221 osi_info.timer[index].state = OSI_STOP; in OSI_timer_update()
222 osi_info.usingTimer--; in OSI_timer_update()
224 if (osi_info.timer[index].callback != NULL) in OSI_timer_update()
225 osi_info.timer[index].callback( in OSI_timer_update()
226 osi_info.timer[index].callback_param); in OSI_timer_update()
228 osi_info.timer[index].timeout = in OSI_timer_update()
229 osi_info.timer[index].init_timeout - in OSI_timer_update()
230 (OSI_timer_get_current_time() - osi_info.timer[index].exact_time); in OSI_timer_update()
242 while (osi_info.usingTimer > 0) { in timer_thread()
259 if (osi_info.timer_thread_flag & OSI_TIMER_THREAD_FLAG_DETACH) in timer_thread()