Lines Matching refs:p_hdr

364     BUFFER_HDR_T  *p_hdr;
423 p_hdr = Q->p_first;
424 Q->p_first = p_hdr->p_next;
434 p_hdr->task_id = GKI_get_taskid();
436 p_hdr->status = BUF_STATUS_UNLINKED;
437 p_hdr->p_next = NULL;
438 p_hdr->Type = 0;
440 LOGD("GKI_getbuf() allocated, %x, %x (%d of %d used) %d", (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, Q->cur_cnt, Q->total, p_cb->freeq[i].total);
442 strncpy(p_hdr->_function, _function_, _GKI_MAX_FUNCTION_NAME_LEN);
443 p_hdr->_function[_GKI_MAX_FUNCTION_NAME_LEN] = '\0';
444 p_hdr->_line = _line_;
446 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE));
461 p_hdr = (BUFFER_HDR_T *)p_cb->pool_start[i];
463 LOGD("pool %d has a total of %d buffers (start=%p)", i, p_cb->freeq[i].total, p_hdr);
465 for (x=0; p_hdr && x < p_cb->freeq[i].total; x++)
467 if (p_hdr->status != BUF_STATUS_FREE)
469 LOGD("pool:%d, buf[%d]:%x, hdr:%x status=%d func:%s(line=%d)", i, x, (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, p_hdr->status, p_hdr->_function, p_hdr->_line);
472 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_hdr + p_cb->pool_size[i]);
508 BUFFER_HDR_T *p_hdr;
535 p_hdr = Q->p_first;
536 Q->p_first = p_hdr->p_next;
547 p_hdr->task_id = GKI_get_taskid();
549 p_hdr->status = BUF_STATUS_UNLINKED;
550 p_hdr->p_next = NULL;
551 p_hdr->Type = 0;
554 LOGD("GKI_getpoolbuf() allocated, %x, %x (%d of %d used) %d", (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, Q->cur_cnt, Q->total, p_cb->freeq[pool_id].total);
556 strncpy(p_hdr->_function, _function_, _GKI_MAX_FUNCTION_NAME_LEN);
557 p_hdr->_function[_GKI_MAX_FUNCTION_NAME_LEN] = '\0';
558 p_hdr->_line = _line_;
560 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE));
589 BUFFER_HDR_T *p_hdr;
599 p_hdr = (BUFFER_HDR_T *) ((UINT8 *)p_buf - BUFFER_HDR_SIZE);
602 LOGD("GKI_freebuf() freeing, %x, %x, func:%s(line=%d)", p_buf, p_hdr, p_hdr->_function, p_hdr->_line);
605 if (p_hdr->status != BUF_STATUS_UNLINKED)
611 if (p_hdr->q_id >= GKI_NUM_TOTAL_BUF_POOLS)
622 Q = &gki_cb.com.freeq[p_hdr->q_id];
624 Q->p_last->p_next = p_hdr;
626 Q->p_first = p_hdr;
628 Q->p_last = p_hdr;
629 p_hdr->p_next = NULL;
630 p_hdr->status = BUF_STATUS_FREE;
631 p_hdr->task_id = GKI_INVALID_TASK;
654 BUFFER_HDR_T *p_hdr;
656 p_hdr = (BUFFER_HDR_T *)((UINT8 *) p_buf - BUFFER_HDR_SIZE);
658 if ((UINT32)p_hdr & 1)
661 if (p_hdr->q_id < GKI_NUM_TOTAL_BUF_POOLS)
663 return (gki_cb.com.freeq[p_hdr->q_id].size);
711 BUFFER_HDR_T *p_hdr;
730 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) msg - BUFFER_HDR_SIZE);
732 if (p_hdr->status != BUF_STATUS_UNLINKED)
741 p_cb->OSTaskQLast[task_id][mbox]->p_next = p_hdr;
743 p_cb->OSTaskQFirst[task_id][mbox] = p_hdr;
745 p_cb->OSTaskQLast[task_id][mbox] = p_hdr;
747 p_hdr->p_next = NULL;
748 p_hdr->status = BUF_STATUS_QUEUED;
749 p_hdr->task_id = task_id;
775 BUFFER_HDR_T *p_hdr;
784 p_hdr = gki_cb.com.OSTaskQFirst[task_id][mbox];
785 gki_cb.com.OSTaskQFirst[task_id][mbox] = p_hdr->p_next;
787 p_hdr->p_next = NULL;
788 p_hdr->status = BUF_STATUS_UNLINKED;
790 p_buf = (UINT8 *)p_hdr + BUFFER_HDR_SIZE;
814 BUFFER_HDR_T *p_hdr;
824 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE);
826 if (p_hdr->status != BUF_STATUS_UNLINKED)
838 p_last_hdr->p_next = p_hdr;
846 p_hdr->p_next = NULL;
847 p_hdr->status = BUF_STATUS_QUEUED;
869 BUFFER_HDR_T *p_hdr;
879 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE);
881 if (p_hdr->status != BUF_STATUS_UNLINKED)
891 p_hdr->p_next = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
898 p_hdr->p_next = NULL;
902 p_hdr->status = BUF_STATUS_QUEUED;
923 BUFFER_HDR_T *p_hdr;
933 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
937 if (p_hdr->p_next)
938 p_q->p_first = ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE);
947 p_hdr->p_next = NULL;
948 p_hdr->status = BUF_STATUS_UNLINKED;
952 return ((UINT8 *)p_hdr + BUFFER_HDR_SIZE);
1056 BUFFER_HDR_T *p_hdr;
1058 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE);
1060 if (p_hdr->p_next)
1061 return ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE);
1243 BUFFER_HDR_T *p_hdr;
1252 p_hdr = Q->p_first;
1253 Q->p_first = p_hdr->p_next;
1261 p_hdr->task_id = GKI_get_taskid();
1263 p_hdr->status = BUF_STATUS_UNLINKED;
1264 p_hdr->p_next = NULL;
1265 p_hdr->Type = 0;
1267 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE));
1331 BUFFER_HDR_T *p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE);
1333 p_hdr->task_id = task_id;
1350 BUFFER_HDR_T *p_hdr;
1377 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) msg - BUFFER_HDR_SIZE);
1379 if (p_hdr->status != BUF_STATUS_UNLINKED)
1386 p_cb->OSTaskQLast[task_id][mbox]->p_next = p_hdr;
1388 p_cb->OSTaskQFirst[task_id][mbox] = p_hdr;
1390 p_cb->OSTaskQLast[task_id][mbox] = p_hdr;
1392 p_hdr->p_next = NULL;
1393 p_hdr->status = BUF_STATUS_QUEUED;
1394 p_hdr->task_id = task_id;