File: wrap_pmemobj_defrag.h

package info (click to toggle)
libpmemobj-cpp 1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,388 kB
  • sloc: cpp: 136,076; sh: 1,022; perl: 381; ansic: 163; makefile: 13
file content (30 lines) | stat: -rw-r--r-- 730 bytes parent folder | download
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
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */

/*
 * wrap_pmemobj_defrag.h -- mock function for pmemobj_defrag()
 * used in the concurrent_hash_map tests which are run under Valgrind
 * in order to test only the concurrent_hash_map part of implementation
 * of the defragment() method and not pmemobj_defrag() itself.
 * These tests would last too long without this mock function.
 */

#include <libpmemobj/atomic_base.h>

#ifdef __cplusplus
extern "C" {
#endif

/*
 * __wrap_pmemobj_defrag -- mock function for pmemobj_defrag()
 */
int
__wrap_pmemobj_defrag(PMEMobjpool *pop, PMEMoid **oidv, size_t oidcnt,
		      struct pobj_defrag_result *result)
{
	return 0;
}

#ifdef __cplusplus
}
#endif