16 #ifndef __included_maplog_h__ 17 #define __included_maplog_h__ 36 #include <sys/types.h> 59 u8 file_basename[256];
62 #define MAPLOG_MAJOR_VERSION 1 63 #define MAPLOG_MINOR_VERSION 0 64 #define MAPLOG_PATCH_VERSION 0 84 volatile u8 *file_baseva[2];
92 #define CLIB_MAPLOG_FLAG_INIT (1<<0) 117 u64 my_record_index);
144 return _clib_maplog_get_entry_slowpath (mm, my_record_index);
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
u8 application_patch_version
applcation patch version number
volatile u64 next_record_index
rw cache line: atomic ticket-counter, file index
void clib_maplog_close(clib_maplog_main_t *mm)
Close a mapped log, and update the log header file.
int clib_maplog_init(clib_maplog_init_args_t *ap)
Initialize a maplog object.
u64 file_size_in_records
file size in records, rounded to a power of two
volatile u32 current_file_index
current file index
u32 record_size_in_cachelines
record size in cache lines
#define CLIB_MAPLOG_FLAG_INIT
u32 log2_file_size_in_records
lg file size in records
u8 * file_basename
basename, e.g.
u8 application_minor_version
applcation minor version number
u32 application_id
application identifier
volatile u32 flags
flags, currently just "init" or not
static void * clib_maplog_get_entry(clib_maplog_main_t *mm)
Obtain a log entry pointer.
u8 application_major_version
applcation major version number
volatile u8 * file_baseva[2]
active segment base addresses
char * file_basename
file base name
u32 record_size_in_bytes
record size in bytes
format_function_t format_maplog_header
u8 * header_filename
log header file name
int clib_maplog_process(char *file_basename, void *fp_arg)
Process a complete maplog.
Process-private main data structure.
u64 file_size_in_bytes
file size in bytes
void clib_maplog_update_header(clib_maplog_main_t *mm)
Update a mapped log header file.
#define CLIB_CACHE_LINE_BYTES
clib_maplog_main_t * mm
pointer to the main structure
log initialization structure