MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SHM_Writer Class Reference

Public Member Functions

 SHM_Writer (char *const _startOfBuffer, Uint32 _sizeOfBuffer, Uint32 _slack, Uint32 *_readIndex, Uint32 *_writeIndex)
void clear ()
char * getWritePtr (Uint32 sz)
void updateWritePtr (Uint32 sz)
Uint32 getWriteIndex () const
Uint32 getBufferSize () const
Uint32 get_free_buffer () const
void copyIndexes (SHM_Writer *standbyWriter)
Uint32 writev (const struct iovec *vec, int count)

Detailed Description

Definition at line 138 of file SHM_Buffer.hpp.

Member Function Documentation

Uint32 SHM_Writer::writev ( const struct iovec vec,
int  count 
)
inline

Loop over iovec entries, copying into the shared memory buffer.

The free buffer space may be split with one part after currently used data and one part before. Dealing with this is complicated by the way that the SHM transporter is designed, it assumes signals are never split. So buffer wrap-over is defined at the end of the first signal to cross m_bufferSize (there is extra slack in the buffer to make this possible).

This means that we need to scan the signal data to find the correct place to wrap over in the buffer.

Definition at line 240 of file SHM_Buffer.hpp.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: