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;
806 ** Parameters: p_q - (input) pointer to a queue.
812 void GKI_enqueue (BUFFER_Q *p_q, void *p_buf)
835 if (p_q->p_first)
837 BUFFER_HDR_T *p_last_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_last - BUFFER_HDR_SIZE);
841 p_q->p_first = p_buf;
843 p_q->p_last = p_buf;
844 p_q->count++;
861 ** Parameters: p_q - (input) pointer to a queue.
867 void GKI_enqueue_head (BUFFER_Q *p_q, void *p_buf)
889 if (p_q->p_first)
891 p_hdr->p_next = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
892 p_q->p_first = p_buf;
896 p_q->p_first = p_buf;
897 p_q->p_last = p_buf;
900 p_q->count++;
916 ** Parameters: p_q - (input) pointer to a queue.
921 void *GKI_dequeue (BUFFER_Q *p_q)
927 if (!p_q || !p_q->count)
933 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
938 p_q->p_first = ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE);
941 p_q->p_first = NULL;
942 p_q->p_last = NULL;
945 p_q->count--;
962 ** Parameters: p_q - (input) pointer to a queue.
968 void *GKI_remove_from_queue (BUFFER_Q *p_q, void *p_buf)
975 if (p_buf == p_q->p_first)
978 return (GKI_dequeue (p_q));
982 p_prev = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
992 if (p_buf == p_q->p_last)
993 p_q->p_last = p_prev + 1;
996 p_q->count--;
1017 ** Parameters: p_q - (input) pointer to a queue.
1022 void *GKI_getfirst (BUFFER_Q *p_q)
1024 return (p_q->p_first);
1033 ** Parameters: p_q - (input) pointer to a queue.
1038 void *GKI_getlast (BUFFER_Q *p_q)
1040 return (p_q->p_last);
1074 ** Parameters: p_q - (input) pointer to a queue.
1079 BOOLEAN GKI_queue_is_empty(BUFFER_Q *p_q)
1081 return ((BOOLEAN) (p_q->count == 0));