mirror of
https://github.com/isar/libmdbx.git
synced 2025-12-18 05:42:22 +08:00
mdbx: изменение лицензии и реструктуризация исходного кода.
This commit is contained in:
26
src/txl.h
Normal file
26
src/txl.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/// \copyright SPDX-License-Identifier: Apache-2.0
|
||||
/// \author Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> \date 2015-2024
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "essentials.h"
|
||||
|
||||
/* List of txnid */
|
||||
typedef txnid_t *txl_t;
|
||||
typedef const txnid_t *const_txl_t;
|
||||
|
||||
enum txl_rules {
|
||||
txl_granulate = 32,
|
||||
txl_initial =
|
||||
txl_granulate - 2 - MDBX_ASSUME_MALLOC_OVERHEAD / sizeof(txnid_t),
|
||||
txl_max = (1u << 26) - 2 - MDBX_ASSUME_MALLOC_OVERHEAD / sizeof(txnid_t)
|
||||
};
|
||||
|
||||
MDBX_INTERNAL txl_t txl_alloc(void);
|
||||
|
||||
MDBX_INTERNAL void txl_free(txl_t txl);
|
||||
|
||||
MDBX_INTERNAL int __must_check_result txl_append(txl_t __restrict *ptxl,
|
||||
txnid_t id);
|
||||
|
||||
MDBX_INTERNAL void txl_sort(txl_t txl);
|
||||
Reference in New Issue
Block a user