]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - libfrog/ptvar.h
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
6 #ifndef __LIBFROG_PTVAR_H__
7 #define __LIBFROG_PTVAR_H__
11 int ptvar_alloc(size_t nr
, size_t size
, struct ptvar
**pptv
);
12 void ptvar_free(struct ptvar
*ptv
);
13 void *ptvar_get(struct ptvar
*ptv
, int *ret
);
16 * Visit each per-thread value. Return 0 to continue iteration or nonzero to
17 * stop iterating and return to the caller.
19 typedef int (*ptvar_iter_fn
)(struct ptvar
*ptv
, void *data
, void *foreach_arg
);
20 int ptvar_foreach(struct ptvar
*ptv
, ptvar_iter_fn fn
, void *foreach_arg
);
22 #endif /* __LIBFROG_PTVAR_H__ */