Lines Matching refs:p_q
331 void GKI_init_q (BUFFER_Q *p_q)
333 p_q->p_first = p_q->p_last = NULL;
334 p_q->count = 0;
804 ** Parameters: p_q - (input) pointer to a queue.
810 void GKI_enqueue (BUFFER_Q *p_q, void *p_buf)
833 if (p_q->p_first)
835 BUFFER_HDR_T *p_last_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_last - BUFFER_HDR_SIZE);
839 p_q->p_first = p_buf;
841 p_q->p_last = p_buf;
842 p_q->count++;
859 ** Parameters: p_q - (input) pointer to a queue.
865 void GKI_enqueue_head (BUFFER_Q *p_q, void *p_buf)
887 if (p_q->p_first)
889 p_hdr->p_next = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
890 p_q->p_first = p_buf;
894 p_q->p_first = p_buf;
895 p_q->p_last = p_buf;
898 p_q->count++;
914 ** Parameters: p_q - (input) pointer to a queue.
919 void *GKI_dequeue (BUFFER_Q *p_q)
925 if (!p_q || !p_q->count)
931 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
936 p_q->p_first = ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE);
939 p_q->p_first = NULL;
940 p_q->p_last = NULL;
943 p_q->count--;
960 ** Parameters: p_q - (input) pointer to a queue.
966 void *GKI_remove_from_queue (BUFFER_Q *p_q, void *p_buf)
973 if (p_buf == p_q->p_first)
976 return (GKI_dequeue (p_q));
980 p_prev = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
990 if (p_buf == p_q->p_last)
991 p_q->p_last = p_prev + 1;
994 p_q->count--;
1015 ** Parameters: p_q - (input) pointer to a queue.
1020 void *GKI_getfirst (BUFFER_Q *p_q)
1022 return (p_q->p_first);
1031 ** Parameters: p_q - (input) pointer to a queue.
1036 void *GKI_getlast (BUFFER_Q *p_q)
1038 return (p_q->p_last);
1072 ** Parameters: p_q - (input) pointer to a queue.
1077 BOOLEAN GKI_queue_is_empty(BUFFER_Q *p_q)
1079 return ((BOOLEAN) (p_q->count == 0));