A C++ library for logging very fast and without allocating.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#pragma once
|
|
|
|
#include <unordered_map>
|
|
#include <string>
|
|
#include <functional>
|
|
#include <any>
|
|
#include "disruptor.h"
|
|
|
|
struct registry_slab {
|
|
int id;
|
|
std::string name;
|
|
std::function<token_t(size_t)> reserve_write;
|
|
std::function<token_t(size_t)> reserve_write_c_align;
|
|
std::function<void(token_t)> conclude_write;
|
|
std::function<write_span(token_t)> get_buffer;
|
|
std::any disruptor;
|
|
};
|
|
|
|
/**
|
|
* @internal used because we need the pointer stability
|
|
* @see sl_transaction
|
|
*/
|
|
extern std::unordered_map<int, registry_slab> registry_map;
|