Rename microkernel struct field 'iAvailDataCont' to 'available_data_count'.
Rename field 'iAvailDataCont' of the struct: - '_k_pipe_desc' in the file include/microkernel/base_api.h Change-Id: Id2a45f9f838fdc557bfbecbe0a492f95a34517a7 Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
parent
9c220d0040
commit
eeace5aa8f
|
@ -192,7 +192,7 @@ struct _k_pipe_desc {
|
|||
int free_space_count;
|
||||
int free_space_post_wrap_around;
|
||||
int num_pending_reads;
|
||||
int iAvailDataCont;
|
||||
int available_data_count;
|
||||
int iAvailDataAWA; /* AWA == After Wrap Around */
|
||||
int iNbrPendingWrites;
|
||||
bool bWriteWA;
|
||||
|
|
|
@ -47,7 +47,7 @@ void BuffGetFreeSpace(struct _k_pipe_desc *desc, int *piTotalFreeSpace,
|
|||
|
||||
void BuffGetAvailDataTotal(struct _k_pipe_desc *desc, int *piAvailDataTotal);
|
||||
void BuffGetAvailData(struct _k_pipe_desc *desc, int *piAvailDataTotal,
|
||||
int *piAvailDataCont, int *piAvailDataAWA);
|
||||
int *available_data_count_ptr, int *piAvailDataAWA);
|
||||
|
||||
int BuffEmpty(struct _k_pipe_desc *desc);
|
||||
int BuffFull(struct _k_pipe_desc *desc);
|
||||
|
|
|
@ -328,7 +328,7 @@ void BuffInit(unsigned char *pBuffer, int *piBuffSize, struct _k_pipe_desc *desc
|
|||
desc->free_space_count = desc->buffer_size;
|
||||
desc->free_space_post_wrap_around = 0;
|
||||
desc->num_pending_reads = 0;
|
||||
desc->iAvailDataCont = 0;
|
||||
desc->available_data_count = 0;
|
||||
desc->iAvailDataAWA = 0;
|
||||
desc->iNbrPendingWrites = 0;
|
||||
MarkersClear(&desc->WriteMarkers);
|
||||
|
@ -407,7 +407,7 @@ int BuffEmpty(struct _k_pipe_desc *desc)
|
|||
return (desc->buffer_size == iTotalFreeSpace);
|
||||
}
|
||||
|
||||
int CalcAvailData(struct _k_pipe_desc *desc, int *piAvailDataCont,
|
||||
int CalcAvailData(struct _k_pipe_desc *desc, int *available_data_count_ptr,
|
||||
int *piAvailDataAWA)
|
||||
{
|
||||
unsigned char *pStart = desc->read_ptr;
|
||||
|
@ -422,9 +422,9 @@ int CalcAvailData(struct _k_pipe_desc *desc, int *piAvailDataCont,
|
|||
*/
|
||||
|
||||
if (BUFF_FULL == desc->BuffState) {
|
||||
*piAvailDataCont = SIZEOFUNIT_TO_OCTET(desc->end_ptr - pStart);
|
||||
*available_data_count_ptr = SIZEOFUNIT_TO_OCTET(desc->end_ptr - pStart);
|
||||
*piAvailDataAWA = SIZEOFUNIT_TO_OCTET(pStop - desc->begin_ptr);
|
||||
return (*piAvailDataCont + *piAvailDataAWA);
|
||||
return (*available_data_count_ptr + *piAvailDataAWA);
|
||||
/* this sum equals end_ptr-begin_ptr */
|
||||
}
|
||||
}
|
||||
|
@ -435,28 +435,28 @@ int CalcAvailData(struct _k_pipe_desc *desc, int *piAvailDataCont,
|
|||
*/
|
||||
|
||||
if (pStop >= pStart) {
|
||||
*piAvailDataCont = SIZEOFUNIT_TO_OCTET(pStop - pStart);
|
||||
*available_data_count_ptr = SIZEOFUNIT_TO_OCTET(pStop - pStart);
|
||||
*piAvailDataAWA = 0;
|
||||
} else {
|
||||
*piAvailDataCont = SIZEOFUNIT_TO_OCTET(desc->end_ptr - pStart);
|
||||
*available_data_count_ptr = SIZEOFUNIT_TO_OCTET(desc->end_ptr - pStart);
|
||||
*piAvailDataAWA = SIZEOFUNIT_TO_OCTET(pStop - desc->begin_ptr);
|
||||
}
|
||||
return (*piAvailDataCont + *piAvailDataAWA);
|
||||
return (*available_data_count_ptr + *piAvailDataAWA);
|
||||
}
|
||||
|
||||
void BuffGetAvailData(struct _k_pipe_desc *desc, int *piAvailDataTotal,
|
||||
int *piAvailDataCont, int *piAvailDataAWA)
|
||||
int *available_data_count_ptr, int *piAvailDataAWA)
|
||||
{
|
||||
int iAvailDataCont;
|
||||
int available_data_count;
|
||||
int iAvailDataAWA;
|
||||
int iAvailDataTotal;
|
||||
|
||||
iAvailDataTotal =
|
||||
CalcAvailData(desc, &iAvailDataCont, &iAvailDataAWA);
|
||||
__ASSERT_NO_MSG(iAvailDataCont == desc->iAvailDataCont);
|
||||
CalcAvailData(desc, &available_data_count, &iAvailDataAWA);
|
||||
__ASSERT_NO_MSG(available_data_count == desc->available_data_count);
|
||||
__ASSERT_NO_MSG(iAvailDataAWA == desc->iAvailDataAWA);
|
||||
*piAvailDataTotal = iAvailDataTotal;
|
||||
*piAvailDataCont = desc->iAvailDataCont;
|
||||
*available_data_count_ptr = desc->available_data_count;
|
||||
*piAvailDataAWA = desc->iAvailDataAWA;
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ void BuffGetAvailDataTotal(struct _k_pipe_desc *desc, int *piAvailDataTotal)
|
|||
int dummy1, dummy2;
|
||||
|
||||
*piAvailDataTotal = CalcAvailData(desc, &dummy1, &dummy2);
|
||||
__ASSERT_NO_MSG(dummy1 == desc->iAvailDataCont);
|
||||
__ASSERT_NO_MSG(dummy1 == desc->available_data_count);
|
||||
__ASSERT_NO_MSG(dummy2 == desc->iAvailDataAWA);
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ static void AsyncEnQFinished(struct _k_pipe_desc *desc, int iTransferID)
|
|||
|
||||
if (desc->WriteMarkers.first_marker == iTransferID) {
|
||||
int iNewFirstMarker = ScanMarkers(&desc->WriteMarkers,
|
||||
&desc->iAvailDataCont,
|
||||
&desc->available_data_count,
|
||||
&desc->iAvailDataAWA,
|
||||
&desc->iNbrPendingWrites);
|
||||
if (-1 != iNewFirstMarker) {
|
||||
|
@ -653,7 +653,7 @@ int BuffDeQA(struct _k_pipe_desc *desc, int iSize, unsigned char **ppRead,
|
|||
{
|
||||
/* asynchronous data transfer; read guard pointers must be set */
|
||||
|
||||
if (iSize > desc->iAvailDataCont) {
|
||||
if (iSize > desc->available_data_count) {
|
||||
/* free space is from read to guard pointer/end pointer */
|
||||
return 0;
|
||||
}
|
||||
|
@ -669,13 +669,13 @@ int BuffDeQA(struct _k_pipe_desc *desc, int iSize, unsigned char **ppRead,
|
|||
desc->read_ptr += OCTET_TO_SIZEOFUNIT(iSize);
|
||||
if (desc->end_ptr == desc->read_ptr) {
|
||||
desc->read_ptr = desc->begin_ptr;
|
||||
desc->iAvailDataCont = desc->iAvailDataAWA;
|
||||
desc->available_data_count = desc->iAvailDataAWA;
|
||||
desc->iAvailDataAWA = 0;
|
||||
desc->bWriteWA = false;
|
||||
desc->bReadWA = true;
|
||||
desc->WriteMarkers.post_wrap_around_marker = -1;
|
||||
} else {
|
||||
desc->iAvailDataCont -= iSize;
|
||||
desc->available_data_count -= iSize;
|
||||
}
|
||||
|
||||
if (desc->write_ptr == desc->read_ptr) {
|
||||
|
|
|
@ -114,7 +114,7 @@ void _k_pipe_get_request(struct k_args *RequestOrig)
|
|||
|
||||
iData2ReadFromWriters = CalcAvailWriterData(pPipe->writers);
|
||||
iAvailBufferData =
|
||||
pPipe->desc.iAvailDataCont + pPipe->desc.iAvailDataAWA;
|
||||
pPipe->desc.available_data_count + pPipe->desc.iAvailDataAWA;
|
||||
iTotalData2Read =
|
||||
iAvailBufferData + iData2ReadFromWriters;
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ static void pipe_read(struct _k_pipe_struct *pPipe, struct k_args *pNewReader)
|
|||
pipe_read_req = &pReader->args.pipe_xfer_req;
|
||||
|
||||
do {
|
||||
iSize = min(pPipe->desc.iAvailDataCont,
|
||||
iSize = min(pPipe->desc.available_data_count,
|
||||
pipe_read_req->iSizeTotal - pipe_read_req->iSizeXferred);
|
||||
|
||||
if (iSize == 0) {
|
||||
|
@ -622,7 +622,7 @@ static void pipe_read_write(
|
|||
int iFreeSpaceBuffer =
|
||||
(pPipe->desc.free_space_count + pPipe->desc.free_space_post_wrap_around);
|
||||
int iAvailDataBuffer =
|
||||
(pPipe->desc.iAvailDataCont + pPipe->desc.iAvailDataAWA);
|
||||
(pPipe->desc.available_data_count + pPipe->desc.iAvailDataAWA);
|
||||
|
||||
iT1 = min(iFreeSpaceReader, iAvailDataBuffer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue