Home | History | Annotate | Download | only in common

Lines Matching defs:p_hdr

364     BUFFER_HDR_T  *p_hdr;
421 p_hdr = Q->p_first;
422 Q->p_first = p_hdr->p_next;
432 p_hdr->task_id = GKI_get_taskid();
434 p_hdr->status = BUF_STATUS_UNLINKED;
435 p_hdr->p_next = NULL;
436 p_hdr->Type = 0;
438 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);
440 strncpy(p_hdr->_function, _function_, _GKI_MAX_FUNCTION_NAME_LEN);
441 p_hdr->_function[_GKI_MAX_FUNCTION_NAME_LEN] = '\0';
442 p_hdr->_line = _line_;
444 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE));
459 p_hdr = (BUFFER_HDR_T *)p_cb->pool_start[i];
461 LOGD("pool %d has a total of %d buffers (start=%p)", i, p_cb->freeq[i].total, p_hdr);
463 for (x=0; p_hdr && x < p_cb->freeq[i].total; x++)
465 if (p_hdr->status != BUF_STATUS_FREE)
467 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);
470 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_hdr + p_cb->pool_size[i]);
506 BUFFER_HDR_T *p_hdr;
533 p_hdr = Q->p_first;
534 Q->p_first = p_hdr->p_next;
545 p_hdr->task_id = GKI_get_taskid();
547 p_hdr->status = BUF_STATUS_UNLINKED;
548 p_hdr->p_next = NULL;
549 p_hdr->Type = 0;
552 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);
554 strncpy(p_hdr->_function, _function_, _GKI_MAX_FUNCTION_NAME_LEN);
555 p_hdr->_function[_GKI_MAX_FUNCTION_NAME_LEN] = '\0';
556 p_hdr->_line = _line_;
558 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE));
587 BUFFER_HDR_T *p_hdr;
597 p_hdr = (BUFFER_HDR_T *) ((UINT8 *)p_buf - BUFFER_HDR_SIZE);
600 LOGD("GKI_freebuf() freeing, %x, %x, func:%s(line=%d)", p_buf, p_hdr, p_hdr->_function, p_hdr->_line);
603 if (p_hdr->status != BUF_STATUS_UNLINKED)
609 if (p_hdr->q_id >= GKI_NUM_TOTAL_BUF_POOLS)
620 Q = &gki_cb.com.freeq[p_hdr->q_id];
622 Q->p_last->p_next = p_hdr;
624 Q->p_first = p_hdr;
626 Q->p_last = p_hdr;
627 p_hdr->p_next = NULL;
628 p_hdr->status = BUF_STATUS_FREE;
629 p_hdr->task_id = GKI_INVALID_TASK;
652 BUFFER_HDR_T *p_hdr;
654 p_hdr = (BUFFER_HDR_T *)((UINT8 *) p_buf - BUFFER_HDR_SIZE);
656 if ((UINT32)p_hdr & 1)
659 if (p_hdr->q_id < GKI_NUM_TOTAL_BUF_POOLS)
661 return (gki_cb.com.freeq[p_hdr->q_id].size);
709 BUFFER_HDR_T *p_hdr;
728 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) msg - BUFFER_HDR_SIZE);
730 if (p_hdr->status != BUF_STATUS_UNLINKED)
739 p_cb->OSTaskQLast[task_id][mbox]->p_next = p_hdr;
741 p_cb->OSTaskQFirst[task_id][mbox] = p_hdr;
743 p_cb->OSTaskQLast[task_id][mbox] = p_hdr;
745 p_hdr->p_next = NULL;
746 p_hdr->status = BUF_STATUS_QUEUED;
747 p_hdr->task_id = task_id;
773 BUFFER_HDR_T *p_hdr;
782 p_hdr = gki_cb.com.OSTaskQFirst[task_id][mbox];
783 gki_cb.com.OSTaskQFirst[task_id][mbox] = p_hdr->p_next;
785 p_hdr->p_next = NULL;
786 p_hdr->status = BUF_STATUS_UNLINKED;
788 p_buf = (UINT8 *)p_hdr + BUFFER_HDR_SIZE;
812 BUFFER_HDR_T *p_hdr;
822 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE);
824 if (p_hdr->status != BUF_STATUS_UNLINKED)
836 p_last_hdr->p_next = p_hdr;
844 p_hdr->p_next = NULL;
845 p_hdr->status = BUF_STATUS_QUEUED;
867 BUFFER_HDR_T *p_hdr;
877 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE);
879 if (p_hdr->status != BUF_STATUS_UNLINKED)
889 p_hdr->p_next = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
896 p_hdr->p_next = NULL;
900 p_hdr->status = BUF_STATUS_QUEUED;
921 BUFFER_HDR_T *p_hdr;
931 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
935 if (p_hdr->p_next)
936 p_q->p_first = ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE);
945 p_hdr->p_next = NULL;
946 p_hdr->status = BUF_STATUS_UNLINKED;
950 return ((UINT8 *)p_hdr + BUFFER_HDR_SIZE);
1054 BUFFER_HDR_T *p_hdr;
1056 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE);
1058 if (p_hdr->p_next)
1059 return ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE);
1241 BUFFER_HDR_T *p_hdr;
1250 p_hdr = Q->p_first;
1251 Q->p_first = p_hdr->p_next;
1259 p_hdr->task_id = GKI_get_taskid();
1261 p_hdr->status = BUF_STATUS_UNLINKED;
1262 p_hdr->p_next = NULL;
1263 p_hdr->Type = 0;
1265 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE));
1329 BUFFER_HDR_T *p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE);
1331 p_hdr->task_id = task_id;
1348 BUFFER_HDR_T *p_hdr;
1375 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) msg - BUFFER_HDR_SIZE);
1377 if (p_hdr->status != BUF_STATUS_UNLINKED)
1384 p_cb->OSTaskQLast[task_id][mbox]->p_next = p_hdr;
1386 p_cb->OSTaskQFirst[task_id][mbox] = p_hdr;
1388 p_cb->OSTaskQLast[task_id][mbox] = p_hdr;
1390 p_hdr->p_next = NULL;
1391 p_hdr->status = BUF_STATUS_QUEUED;
1392 p_hdr->task_id = task_id;