Lines Matching refs:p_hdr
257 BUFFER_HDR_T* p_hdr; in GKI_getbuf() local
299 p_hdr = Q->p_first; in GKI_getbuf()
300 Q->p_first = p_hdr->p_next; in GKI_getbuf()
308 p_hdr->task_id = GKI_get_taskid(); in GKI_getbuf()
310 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_getbuf()
311 p_hdr->p_next = nullptr; in GKI_getbuf()
312 p_hdr->Type = 0; in GKI_getbuf()
313 return ((void*)((uint8_t*)p_hdr + BUFFER_HDR_SIZE)); in GKI_getbuf()
342 BUFFER_HDR_T* p_hdr; in GKI_getpoolbuf() local
360 p_hdr = Q->p_first; in GKI_getpoolbuf()
361 Q->p_first = p_hdr->p_next; in GKI_getpoolbuf()
369 p_hdr->task_id = GKI_get_taskid(); in GKI_getpoolbuf()
371 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_getpoolbuf()
372 p_hdr->p_next = nullptr; in GKI_getpoolbuf()
373 p_hdr->Type = 0; in GKI_getpoolbuf()
375 return ((void*)((uint8_t*)p_hdr + BUFFER_HDR_SIZE)); in GKI_getpoolbuf()
399 BUFFER_HDR_T* p_hdr; in GKI_freebuf() local
408 p_hdr = (BUFFER_HDR_T*)((uint8_t*)p_buf - BUFFER_HDR_SIZE); in GKI_freebuf()
410 if (p_hdr->status != BUF_STATUS_UNLINKED) { in GKI_freebuf()
415 if (p_hdr->q_id >= GKI_NUM_TOTAL_BUF_POOLS) { in GKI_freebuf()
425 Q = &gki_cb.com.freeq[p_hdr->q_id]; in GKI_freebuf()
427 Q->p_last->p_next = p_hdr; in GKI_freebuf()
429 Q->p_first = p_hdr; in GKI_freebuf()
431 Q->p_last = p_hdr; in GKI_freebuf()
432 p_hdr->p_next = nullptr; in GKI_freebuf()
433 p_hdr->status = BUF_STATUS_FREE; in GKI_freebuf()
434 p_hdr->task_id = GKI_INVALID_TASK; in GKI_freebuf()
454 BUFFER_HDR_T* p_hdr; in GKI_get_buf_size() local
456 p_hdr = (BUFFER_HDR_T*)((uint8_t*)p_buf - BUFFER_HDR_SIZE); in GKI_get_buf_size()
458 if ((uintptr_t)p_hdr & 1) return (0); in GKI_get_buf_size()
460 if (p_hdr->q_id < GKI_NUM_TOTAL_BUF_POOLS) { in GKI_get_buf_size()
461 return (gki_cb.com.freeq[p_hdr->q_id].size); in GKI_get_buf_size()
505 BUFFER_HDR_T* p_hdr; in GKI_send_msg() local
523 p_hdr = (BUFFER_HDR_T*)((uint8_t*)msg - BUFFER_HDR_SIZE); in GKI_send_msg()
525 if (p_hdr->status != BUF_STATUS_UNLINKED) { in GKI_send_msg()
533 p_cb->OSTaskQLast[task_id][mbox]->p_next = p_hdr; in GKI_send_msg()
535 p_cb->OSTaskQFirst[task_id][mbox] = p_hdr; in GKI_send_msg()
537 p_cb->OSTaskQLast[task_id][mbox] = p_hdr; in GKI_send_msg()
539 p_hdr->p_next = nullptr; in GKI_send_msg()
540 p_hdr->status = BUF_STATUS_QUEUED; in GKI_send_msg()
541 p_hdr->task_id = task_id; in GKI_send_msg()
565 BUFFER_HDR_T* p_hdr; in GKI_read_mbox() local
572 p_hdr = gki_cb.com.OSTaskQFirst[task_id][mbox]; in GKI_read_mbox()
573 gki_cb.com.OSTaskQFirst[task_id][mbox] = p_hdr->p_next; in GKI_read_mbox()
575 p_hdr->p_next = nullptr; in GKI_read_mbox()
576 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_read_mbox()
578 p_buf = (uint8_t*)p_hdr + BUFFER_HDR_SIZE; in GKI_read_mbox()
599 BUFFER_HDR_T* p_hdr; in GKI_enqueue() local
608 p_hdr = (BUFFER_HDR_T*)((uint8_t*)p_buf - BUFFER_HDR_SIZE); in GKI_enqueue()
610 if (p_hdr->status != BUF_STATUS_UNLINKED) { in GKI_enqueue()
622 p_last_hdr->p_next = p_hdr; in GKI_enqueue()
629 p_hdr->p_next = nullptr; in GKI_enqueue()
630 p_hdr->status = BUF_STATUS_QUEUED; in GKI_enqueue()
650 BUFFER_HDR_T* p_hdr; in GKI_enqueue_head() local
659 p_hdr = (BUFFER_HDR_T*)((uint8_t*)p_buf - BUFFER_HDR_SIZE); in GKI_enqueue_head()
661 if (p_hdr->status != BUF_STATUS_UNLINKED) { in GKI_enqueue_head()
670 p_hdr->p_next = (BUFFER_HDR_T*)((uint8_t*)p_q->p_first - BUFFER_HDR_SIZE); in GKI_enqueue_head()
675 p_hdr->p_next = nullptr; in GKI_enqueue_head()
679 p_hdr->status = BUF_STATUS_QUEUED; in GKI_enqueue_head()
698 BUFFER_HDR_T* p_hdr; in GKI_dequeue() local
707 p_hdr = (BUFFER_HDR_T*)((uint8_t*)p_q->p_first - BUFFER_HDR_SIZE); in GKI_dequeue()
711 if (p_hdr->p_next) in GKI_dequeue()
712 p_q->p_first = ((uint8_t*)p_hdr->p_next + BUFFER_HDR_SIZE); in GKI_dequeue()
720 p_hdr->p_next = nullptr; in GKI_dequeue()
721 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_dequeue()
725 return ((uint8_t*)p_hdr + BUFFER_HDR_SIZE); in GKI_dequeue()
818 BUFFER_HDR_T* p_hdr; in GKI_getnext() local
820 p_hdr = (BUFFER_HDR_T*)((uint8_t*)p_buf - BUFFER_HDR_SIZE); in GKI_getnext()
822 if (p_hdr->p_next) in GKI_getnext()
823 return ((uint8_t*)p_hdr->p_next + BUFFER_HDR_SIZE); in GKI_getnext()
1030 BUFFER_HDR_T* p_hdr = (BUFFER_HDR_T*)((uint8_t*)p_buf - BUFFER_HDR_SIZE); in GKI_change_buf_owner() local
1032 p_hdr->task_id = task_id; in GKI_change_buf_owner()
1048 BUFFER_HDR_T* p_hdr; in GKI_isend_msg() local
1073 p_hdr = (BUFFER_HDR_T*)((uint8_t*)msg - BUFFER_HDR_SIZE); in GKI_isend_msg()
1075 if (p_hdr->status != BUF_STATUS_UNLINKED) { in GKI_isend_msg()
1081 p_cb->OSTaskQLast[task_id][mbox]->p_next = p_hdr; in GKI_isend_msg()
1083 p_cb->OSTaskQFirst[task_id][mbox] = p_hdr; in GKI_isend_msg()
1085 p_cb->OSTaskQLast[task_id][mbox] = p_hdr; in GKI_isend_msg()
1087 p_hdr->p_next = NULL; in GKI_isend_msg()
1088 p_hdr->status = BUF_STATUS_QUEUED; in GKI_isend_msg()
1089 p_hdr->task_id = task_id; in GKI_isend_msg()