Lines Matching refs:ticks

145 ** Description      This function returns the current system ticks
147 ** Returns The current number of system ticks
160 ** Description This function returns the number of system ticks until the
167 ** Returns Number of ticks til the next timer expires
190 ** ticks - (input) the number of system ticks til the
198 void GKI_start_timer (UINT8 tnum, INT32 ticks, BOOLEAN is_continuous)
205 if (ticks <= 0)
206 ticks = 1;
208 orig_ticks = ticks; /* save the ticks in case adjustment is necessary */
213 reload = ticks;
245 if (GKI_MAX_INT32 - (gki_cb.com.OSNumOrigTicks - gki_cb.com.OSTicksTilExp) > ticks)
247 ticks += gki_cb.com.OSNumOrigTicks - gki_cb.com.OSTicksTilExp;
250 ticks = GKI_MAX_INT32;
257 gki_cb.com.OSTaskTmr0 [task_id] = ticks;
264 gki_cb.com.OSTaskTmr1 [task_id] = ticks;
271 gki_cb.com.OSTaskTmr2 [task_id] = ticks;
278 gki_cb.com.OSTaskTmr3 [task_id] = ticks;
394 /* Increment the number of ticks used for time stamps */
428 /* No need to update the ticks if no timeout has occurred */
439 of ticks. gki_cb.com.OSNumOrigTicks is reset at the bottom of this function so changing this
669 p_tle->ticks = GKI_UNUSED_LIST_ENTRY;
703 while ((p_tle) && (p_tle->ticks <= 0))
715 temp_ticks = p_tle->ticks;
716 p_tle->ticks -= rem_ticks;
719 if (p_tle->ticks <= 0)
721 /* We set the number of ticks to '0' so that the legacy code
723 p_tle->ticks = 0;
728 rem_ticks -= temp_ticks; /* Decrement the remaining ticks to process */
751 ** ticks to expire
757 ** remaining ticks if success
769 /* adding up all of ticks in previous entries */
772 rem_ticks += p_tle->ticks;
779 rem_ticks += p_tle->ticks;
818 if (p_tle->ticks >= 0)
821 if (p_tle->ticks >= p_timer_listq->last_ticks)
837 nr_ticks_total = p_tle->ticks;
838 p_tle->ticks -= p_timer_listq->last_ticks;
846 while (p_tle->ticks > p_temp->ticks)
849 if (p_temp->ticks > 0)
850 p_tle->ticks -= p_temp->ticks;
869 p_temp->ticks -= p_tle->ticks;
919 /* Add the ticks remaining in this timer (if any) to the next guy in the list.
924 p_tle->p_next->ticks += p_tle->ticks;
928 p_timer_listq->last_ticks -= p_tle->ticks;
973 p_tle->ticks = GKI_UNUSED_LIST_ENTRY;
999 ** This only needs to make an adjustment if the new timer (in ticks) is
1000 ** less than the number of ticks remaining on the current timer.
1002 ** Parameters: ticks - (input) number of system ticks of the new timer entry
1010 void gki_adjust_timer_count (INT32 ticks)
1012 if (ticks > 0)
1015 if (gki_cb.com.OSNumOrigTicks == 0 || (ticks < gki_cb.com.OSTicksTilExp && gki_cb.com.OSTicksTilExp > 0))
1017 gki_cb.com.OSNumOrigTicks = (gki_cb.com.OSNumOrigTicks - gki_cb.com.OSTicksTilExp) + ticks;
1018 gki_cb.com.OSTicksTilExp = ticks;