Lines Matching refs:ticks

143 ** Description      This function returns the current system ticks
145 ** Returns The current number of system ticks
158 ** Description This function returns the number of system ticks until the
165 ** Returns Number of ticks til the next timer expires
188 ** ticks - (input) the number of system ticks til the
196 void GKI_start_timer (UINT8 tnum, INT32 ticks, BOOLEAN is_continuous)
203 if (ticks <= 0)
204 ticks = 1;
206 orig_ticks = ticks; /* save the ticks in case adjustment is necessary */
211 reload = ticks;
243 if (GKI_MAX_INT32 - (gki_cb.com.OSNumOrigTicks - gki_cb.com.OSTicksTilExp) > ticks)
245 ticks += gki_cb.com.OSNumOrigTicks - gki_cb.com.OSTicksTilExp;
248 ticks = GKI_MAX_INT32;
255 gki_cb.com.OSTaskTmr0 [task_id] = ticks;
262 gki_cb.com.OSTaskTmr1 [task_id] = ticks;
269 gki_cb.com.OSTaskTmr2 [task_id] = ticks;
276 gki_cb.com.OSTaskTmr3 [task_id] = ticks;
392 /* Increment the number of ticks used for time stamps */
426 /* 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
652 p_tle->ticks = GKI_UNUSED_LIST_ENTRY;
686 while ((p_tle) && (p_tle->ticks <= 0))
698 temp_ticks = p_tle->ticks;
699 p_tle->ticks -= rem_ticks;
702 if (p_tle->ticks <= 0)
704 /* We set the number of ticks to '0' so that the legacy code
706 p_tle->ticks = 0;
711 rem_ticks -= temp_ticks; /* Decrement the remaining ticks to process */
734 ** ticks to expire
740 ** remaining ticks if success
752 /* adding up all of ticks in previous entries */
755 rem_ticks += p_tle->ticks;
762 rem_ticks += p_tle->ticks;
806 if (p_tle->ticks >= 0)
809 if (p_tle->ticks >= p_timer_listq->last_ticks)
825 nr_ticks_total = p_tle->ticks;
826 p_tle->ticks -= p_timer_listq->last_ticks;
834 while (p_tle->ticks > p_temp->ticks)
837 if (p_temp->ticks > 0)
838 p_tle->ticks -= p_temp->ticks;
857 p_temp->ticks -= p_tle->ticks;
907 /* Add the ticks remaining in this timer (if any) to the next guy in the list.
912 p_tle->p_next->ticks += p_tle->ticks;
916 p_timer_listq->last_ticks -= p_tle->ticks;
961 p_tle->ticks = GKI_UNUSED_LIST_ENTRY;
987 ** This only needs to make an adjustment if the new timer (in ticks) is
988 ** less than the number of ticks remaining on the current timer.
990 ** Parameters: ticks - (input) number of system ticks of the new timer entry
998 void gki_adjust_timer_count (INT32 ticks)
1000 if (ticks > 0)
1003 if (gki_cb.com.OSNumOrigTicks == 0 || (ticks < gki_cb.com.OSTicksTilExp && gki_cb.com.OSTicksTilExp > 0))
1005 gki_cb.com.OSNumOrigTicks = (gki_cb.com.OSNumOrigTicks - gki_cb.com.OSTicksTilExp) + ticks;
1006 gki_cb.com.OSTicksTilExp = ticks;