blob: d65da27026de0f6c0ada4a8a05767580749c7a3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright 2016-2020, Intel Corporation */
/*
* rpmem.h -- internal definitions for librpmem
*/
#include "alloc.h"
#include "fault_injection.h"
#define RPMEM_LOG_PREFIX "librpmem"
#define RPMEM_LOG_LEVEL_VAR "RPMEM_LOG_LEVEL"
#define RPMEM_LOG_FILE_VAR "RPMEM_LOG_FILE"
#if FAULT_INJECTION
void
rpmem_inject_fault_at(enum pmem_allocation_type type, int nth,
const char *at);
int
rpmem_fault_injection_enabled(void);
#else
static inline void
rpmem_inject_fault_at(enum pmem_allocation_type type, int nth,
const char *at)
{
abort();
}
static inline int
rpmem_fault_injection_enabled(void)
{
return 0;
}
#endif
|