Lines Matching full:p_tle
649 ** Parameters p_tle - (input) pointer to a timer list queue entry
654 void GKI_init_timer_list_entry (TIMER_LIST_ENT *p_tle)
656 p_tle->p_next = NULL;
657 p_tle->p_prev = NULL;
658 p_tle->ticks = GKI_UNUSED_LIST_ENTRY;
659 p_tle->in_use = FALSE;
683 TIMER_LIST_ENT *p_tle;
688 p_tle = p_timer_listq->p_first;
692 while ((p_tle) && (p_tle->ticks <= 0))
695 p_tle = p_tle->p_next;
702 while ((p_tle != NULL) && (rem_ticks > 0))
704 temp_ticks = p_tle->ticks;
705 p_tle->ticks -= rem_ticks;
708 if (p_tle->ticks <= 0)
712 p_tle->ticks = 0;
718 p_tle = p_tle->p_next;
751 TIMER_LIST_ENT *p_tle;
756 p_tle = p_timer_listq->p_first;
759 while ((p_tle)&&(p_tle != p_target_tle))
761 rem_ticks += p_tle->ticks;
762 p_tle = p_tle->p_next;
766 if (p_tle == p_target_tle)
768 rem_ticks += p_tle->ticks;
795 ** p_tle - (input) pointer to a timer list queue entry
800 void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
805 if (p_tle == NULL || p_timer_listq == NULL) {
806 GKI_TRACE_3("%s: invalid argument %x, %x****************************<<", __func__, p_timer_listq, p_tle);
812 if (p_tle->ticks >= 0)
815 if (p_tle->ticks >= p_timer_listq->last_ticks)
819 p_timer_listq->p_first = p_tle;
824 p_timer_listq->p_last->p_next = p_tle;
826 p_tle->p_prev = p_timer_listq->p_last;
829 p_tle->p_next = NULL;
830 p_timer_listq->p_last = p_tle;
831 nr_ticks_total = p_tle->ticks;
832 p_tle->ticks -= p_timer_listq->last_ticks;
840 while (p_tle->ticks > p_temp->ticks)
844 p_tle->ticks -= p_temp->ticks;
852 p_tle->p_next = p_timer_listq->p_first;
853 p_timer_listq->p_first->p_prev = p_tle;
854 p_timer_listq->p_first = p_tle;
858 p_temp->p_prev->p_next = p_tle;
859 p_tle->p_prev = p_temp->p_prev;
860 p_temp->p_prev = p_tle;
861 p_tle->p_next = p_temp;
863 p_temp->ticks -= p_tle->ticks;
866 p_tle->in_use = TRUE;
898 ** p_tle - (input) pointer to a timer list queue entry
903 void GKI_remove_from_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
908 if (p_tle == NULL || p_tle->in_use == FALSE || p_timer_listq->p_first == NULL)
916 if (p_tle->p_next != NULL)
918 p_tle->p_next->ticks += p_tle->ticks;
922 p_timer_listq->last_ticks -= p_tle->ticks;
927 if (p_timer_listq->p_first == p_tle)
929 p_timer_listq->p_first = p_tle->p_next;
934 if (p_timer_listq->p_last == p_tle)
939 if (p_timer_listq->p_last == p_tle)
941 p_timer_listq->p_last = p_tle->p_prev;
948 if (p_tle->p_next != NULL && p_tle->p_next->p_prev == p_tle)
949 p_tle->p_next->p_prev = p_tle->p_prev;
956 if (p_tle->p_prev != NULL && p_tle->p_prev->p_next == p_tle)
957 p_tle->p_prev->p_next = p_tle->p_next;
966 p_tle->p_next = p_tle->p_prev = NULL;
967 p_tle->ticks = GKI_UNUSED_LIST_ENTRY;
968 p_tle->in_use = FALSE;