Get information about a slogger2 buffer
Synopsis:
#include <slog2_parse.h>
int slog2_get_buffer_info( slog2_log_t log,
int buffer_index,
slog2_buffer_info_t *buffer_info );
Arguments:
- log
- A handle previously returned by
slog2_open_log().
- buffer_index
- The buffer index; indexes range from 0 to (slog2_log_info.num_buffers - 1).
- buffer_info
- A pointer to a slog2_buffer_info_t structure where the function can store the information.
Library:
libslog2parse
Use the -l slog2parse option to
qcc
to link against this library.
Description:
The slog2_get_buffer_info() function gets information about a slogger2 buffer
and stores it in the given slog2_buffer_info structure.
Note:
Before you call this function, you must use the
SLOG2_BUFFER_INFO_INIT macro to
initialize the
slog2_buffer_info structure.
For example:
slog2_buffer_info_t buffer_info = SLOG2_BUFFER_INFO_INIT;
The slog2_buffer_info structure is defined as follows:
typedef struct {
uint32_t size;
uint32_t buffer_size;
const char *buffer_name;
} slog2_buffer_info_t;
- size
- The size of the structure, which is used to determine the version of the software.
- buffer_size
- The size of the buffer, in bytes.
- buffer_name
- A name describing the contents of this buffer.
Returns:
0 on success, or -1 on failure.
Classification:
QNX Neutrino
Safety: |
|
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |