Functions | Variables

P_IOBuffer.h File Reference

A brief file description. More...

#include "libts.h"
#include "ink_resource.h"
Include dependency graph for P_IOBuffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

TS_INLINE int64_t buffer_size_to_index (int64_t size, int64_t max=max_iobuffer_size)
TS_INLINE int64_t iobuffer_size_to_index (int64_t size, int64_t max)
TS_INLINE int64_t index_to_buffer_size (int64_t idx)
TS_INLINE IOBufferBlockiobufferblock_clone (IOBufferBlock *b, int64_t offset, int64_t len)
 Clone a IOBufferBlock chain.
TS_INLINE IOBufferBlockiobufferblock_skip (IOBufferBlock *b, int64_t *poffset, int64_t *plen, int64_t write)
 Skip over specified bytes in chain.
TS_INLINE IOBufferDatanew_IOBufferData_internal (void *b, int64_t size, int64_t asize_index)
TS_INLINE IOBufferDatanew_constant_IOBufferData_internal (void *b, int64_t size)
TS_INLINE IOBufferDatanew_xmalloc_IOBufferData_internal (void *b, int64_t size)
TS_INLINE IOBufferDatanew_IOBufferData_internal (void *b, int64_t size)
TS_INLINE IOBufferDatanew_IOBufferData_internal (int64_t size_index, AllocType type)
TS_INLINE IOBufferBlocknew_IOBufferBlock_internal ()
TS_INLINE IOBufferBlocknew_IOBufferBlock_internal (IOBufferData *d, int64_t len, int64_t offset)
TS_INLINE MIOBuffernew_MIOBuffer_internal (int64_t size_index)
TS_INLINE void free_MIOBuffer (MIOBuffer *mio)
TS_INLINE MIOBuffernew_empty_MIOBuffer_internal (int64_t size_index)
TS_INLINE void free_empty_MIOBuffer (MIOBuffer *mio)

Variables

inkcoreapi ClassAllocator
< MIOBuffer
ioAllocator

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file P_IOBuffer.h.


Function Documentation

TS_INLINE int64_t buffer_size_to_index ( int64_t  size,
int64_t  max = max_iobuffer_size 
)
TS_INLINE void free_empty_MIOBuffer ( MIOBuffer mio  ) 

Definition at line 812 of file P_IOBuffer.h.

References this_thread(), and THREAD_FREE.

Referenced by ClusterState::~ClusterState().

TS_INLINE void free_MIOBuffer ( MIOBuffer mio  ) 
TS_INLINE int64_t index_to_buffer_size ( int64_t  idx  ) 
TS_INLINE int64_t iobuffer_size_to_index ( int64_t  size,
int64_t  max 
)
TS_INLINE IOBufferBlock* iobufferblock_clone ( IOBufferBlock b,
int64_t  offset,
int64_t  len 
)

Clone a IOBufferBlock chain.

Used to snarf a IOBufferBlock chain w/o copy.

Parameters:
b head of source IOBufferBlock chain.
offset # bytes in the beginning to skip.
len bytes to copy from source.
Returns:
ptr to head of new IOBufferBlock chain.

Definition at line 75 of file P_IOBuffer.h.

References IOBufferBlock::_buf_end, IOBufferBlock::_end, IOBufferBlock::_start, IOBufferBlock::clone(), IOBufferBlock::next, and start.

Referenced by CacheVC::openReadFromWriterMain().

TS_INLINE IOBufferBlock* iobufferblock_skip ( IOBufferBlock b,
int64_t *  poffset,
int64_t *  plen,
int64_t  write 
)

Skip over specified bytes in chain.

Used for dropping references.

Parameters:
b head of source IOBufferBlock chain.
poffset originally offset in b, finally offset in returned IOBufferBlock.
plen value of write is subtracted from plen in the function.
write bytes to skip.
Returns:
ptr to head of new IOBufferBlock chain.

Definition at line 112 of file P_IOBuffer.h.

References IOBufferBlock::next, and IOBufferBlock::read_avail().

Referenced by CacheVC::openReadFromWriterMain(), CacheVC::openWriteCloseDataDone(), and CacheVC::openWriteWriteDone().

TS_INLINE IOBufferData* new_constant_IOBufferData_internal ( void *  b,
int64_t  size 
)
TS_INLINE MIOBuffer* new_empty_MIOBuffer_internal ( int64_t  size_index  ) 

Definition at line 797 of file P_IOBuffer.h.

References MIOBuffer::_location, MIOBuffer::size_index, this_thread(), and THREAD_ALLOC.

TS_INLINE IOBufferBlock* new_IOBufferBlock_internal (  ) 

Definition at line 351 of file P_IOBuffer.h.

References IOBufferBlock::_location, ioBlockAllocator, this_thread(), and THREAD_ALLOC.

TS_INLINE IOBufferBlock* new_IOBufferBlock_internal ( IOBufferData d,
int64_t  len,
int64_t  offset 
)
TS_INLINE IOBufferData* new_IOBufferData_internal ( void *  b,
int64_t  size 
)
TS_INLINE IOBufferData* new_IOBufferData_internal ( void *  b,
int64_t  size,
int64_t  asize_index 
)
TS_INLINE IOBufferData* new_IOBufferData_internal ( int64_t  size_index,
AllocType  type 
)
TS_INLINE MIOBuffer* new_MIOBuffer_internal ( int64_t  size_index  ) 

Definition at line 775 of file P_IOBuffer.h.

References MIOBuffer::_location, MIOBuffer::alloc(), this_thread(), and THREAD_ALLOC.

TS_INLINE IOBufferData* new_xmalloc_IOBufferData_internal ( void *  b,
int64_t  size 
)

Variable Documentation

inkcoreapi ClassAllocator<MIOBuffer> ioAllocator