Lines Matching defs:segmentLen
242 nsresult GetReadSegment(const char *&segment, PRUint32 &segmentLen);
245 nsresult GetWriteSegment(char *&segment, PRUint32 &segmentLen);
401 nsPipe::GetReadSegment(const char *&segment, PRUint32 &segmentLen)
409 segmentLen = mReadLimit - mReadCursor;
473 nsPipe::GetWriteSegment(char *&segment, PRUint32 &segmentLen)
507 segmentLen = mWriteLimit - mWriteCursor;
725 PRUint32 segmentLen;
729 rv = mPipe->GetReadSegment(segment, segmentLen);
755 if (segmentLen > count)
756 segmentLen = count;
758 PRUint32 writeCount, originalLen = segmentLen;
759 while (segmentLen) {
762 rv = writer(this, closure, segment, *readCount, segmentLen, &writeCount);
772 NS_ASSERTION(writeCount <= segmentLen, "wrote more than expected");
774 segmentLen -= writeCount;
780 if (segmentLen < originalLen)
781 mPipe->AdvanceReadCursor(originalLen - segmentLen);
1067 PRUint32 segmentLen;
1071 rv = mPipe->GetWriteSegment(segment, segmentLen);
1091 if (segmentLen > count)
1092 segmentLen = count;
1094 PRUint32 readCount, originalLen = segmentLen;
1095 while (segmentLen) {
1098 rv = reader(this, closure, segment, *writeCount, segmentLen, &readCount);
1108 NS_ASSERTION(readCount <= segmentLen, "read more than expected");
1110 segmentLen -= readCount;
1116 if (segmentLen < originalLen)
1117 mPipe->AdvanceWriteCursor(originalLen - segmentLen);