obtainMessageBuffer overloads

Synopses

Declared in <ball_log.h>

Return a managed pointer that refers to the memory block to which this thread of execution has exclusive access and load the size (in bytes) of this buffer into the specified bufferSize address. Note that this method is intended for internal use only.

static
bslma::ManagedPtr<char>
obtainMessageBuffer(int* bufferSize);

Block until access to the buffer used for formatting messages in this thread of execution is available. Return the address of the modifiable buffer to which this thread of execution has exclusive access, load the address of the mutex that protects the buffer into the specified *mutex address, and load the size (in bytes) of the buffer into the specified bufferSize address. The address remains valid, and the buffer remains locked by this thread of execution, until the Log::releaseMessageBuffer method is called. The behavior is undefined if this thread of execution currently holds a lock on the buffer. Note that the buffer is intended to be used only for formatting log messages immediately before a call to Log::logMessage; other use may adversely affect performance for the entire program.

static
char*
obtainMessageBuffer(
    bslmt::Mutex** mutex,
    int* bufferSize);

Created with MrDocs