2 Star 1 Fork 1

吴越/spdk_oss

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pm.h 929 Bytes
一键复制 编辑 原始数据 按行查看 历史
吴越 提交于 2020-12-16 19:03 . update
#ifndef PM_H
#define PM_H
#include "util/common.h"
union pmem_transaction_t;
struct pmem_t;
extern struct pmem_t *pmem_open(const char *path, uint64_t cpu, uint64_t *mem_size);
extern void pmem_read(struct pmem_t *pmem, void *dest, uint64_t offset , size_t length);
extern void pmem_write(struct pmem_t *pmem, int sync, const void* src, uint64_t offset, size_t length);
extern void pmem_recovery(struct pmem_t *pmem);
extern union pmem_transaction_t* pmem_transaction_alloc(struct pmem_t *pmem);
//pmem_addr % 1 == 0
//len % 1 == 0
extern bool pmem_transaction_add(struct pmem_t *pmem, union pmem_transaction_t *tx,
const uint64_t pm_ofst, void *paddr,
size_t len, void *new_value);
extern bool pmem_transaction_apply(struct pmem_t *pmem, union pmem_transaction_t *tx);
extern void pmem_transaction_free(struct pmem_t *pmem, union pmem_transaction_t *tx);
extern void pmem_close(struct pmem_t *pmem);
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wynebula/spdk_oss.git
git@gitee.com:wynebula/spdk_oss.git
wynebula
spdk_oss
spdk_oss
master

搜索帮助