#ifndef __XFS_SCRUB_XFARRAY_H__
#define __XFS_SCRUB_XFARRAY_H__
xfarray_idx_t;
#define XFARRAY_NULLIDX …
#define XFARRAY_CURSOR_INIT …
#define foreach_xfarray_idx(array, idx) …
struct xfarray { … };
int xfarray_create(const char *descr, unsigned long long required_capacity,
size_t obj_size, struct xfarray **arrayp);
void xfarray_destroy(struct xfarray *array);
int xfarray_load(struct xfarray *array, xfarray_idx_t idx, void *ptr);
int xfarray_unset(struct xfarray *array, xfarray_idx_t idx);
int xfarray_store(struct xfarray *array, xfarray_idx_t idx, const void *ptr);
int xfarray_store_anywhere(struct xfarray *array, const void *ptr);
bool xfarray_element_is_null(struct xfarray *array, const void *ptr);
void xfarray_truncate(struct xfarray *array);
unsigned long long xfarray_bytes(struct xfarray *array);
static inline int
xfarray_load_sparse(
struct xfarray *array,
uint64_t idx,
void *rec)
{ … }
static inline int xfarray_append(struct xfarray *array, const void *ptr)
{ … }
uint64_t xfarray_length(struct xfarray *array);
int xfarray_load_next(struct xfarray *array, xfarray_idx_t *idx, void *rec);
static inline int
xfarray_iter(
struct xfarray *array,
xfarray_idx_t *idx,
void *rec)
{ … }
xfarray_cmp_fn;
#define XFARRAY_ISORT_SHIFT …
#define XFARRAY_ISORT_NR …
#define XFARRAY_QSORT_PIVOT_NR …
struct xfarray_sortinfo { … };
#define XFARRAY_SORT_KILLABLE …
int xfarray_sort(struct xfarray *array, xfarray_cmp_fn cmp_fn,
unsigned int flags);
#endif