Exemplo n.º 1
0
bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
{
	LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
	std::vector<LLSegment> segments;
	if(copyIntoBuffers(channel, src, len, segments))
	{
		mSegments.insert(mSegments.begin(), segments.begin(), segments.end());
		return true;
	}
	return false;
}
Exemplo n.º 2
0
//mMutexp should be locked before calling this.
bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
{
	ASSERT_LLBUFFERARRAY_MUTEX_LOCKED

	std::vector<LLSegment> segments;
	if(copyIntoBuffers(channel, src, len, segments))
	{
		mSegments.insert(mSegments.begin(), segments.begin(), segments.end());
		return true;
	}
	return false;
}
Exemplo n.º 3
0
bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
{
	LLMutexLock lock(mMutexp) ;

	std::vector<LLSegment> segments;
	if(copyIntoBuffers(channel, src, len, segments))
	{
		mSegments.insert(mSegments.end(), segments.begin(), segments.end());
		return true;
	}
	return false;
}
Exemplo n.º 4
0
bool LLBufferArray::insertAfter(
	segment_iterator_t segment,
	S32 channel,
	const U8* src,
	S32 len)
{
	LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
	std::vector<LLSegment> segments;
	if(mSegments.end() != segment)
	{
		++segment;
	}
	if(copyIntoBuffers(channel, src, len, segments))
	{
		mSegments.insert(segment, segments.begin(), segments.end());
		return true;
	}
	return false;
}
Exemplo n.º 5
0
bool LLBufferArray::insertAfter(
	segment_iterator_t segment,
	S32 channel,
	const U8* src,
	S32 len)
{
	std::vector<LLSegment> segments;

	LLMutexLock lock(mMutexp) ;
	if(mSegments.end() != segment)
	{
		++segment;
	}
	if(copyIntoBuffers(channel, src, len, segments))
	{
		mSegments.insert(segment, segments.begin(), segments.end());
		return true;
	}
	return false;
}