]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - scrub/counter.h
xfs_scrub: handle spurious wakeups in scan_fs_tree
[thirdparty/xfsprogs-dev.git] / scrub / counter.h
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 * Copyright (C) 2018 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6 #ifndef XFS_SCRUB_COUNTER_H_
7 #define XFS_SCRUB_COUNTER_H_
8
9 struct ptcounter;
10 int ptcounter_alloc(size_t nr, struct ptcounter **pp);
11 void ptcounter_free(struct ptcounter *ptc);
12 int ptcounter_add(struct ptcounter *ptc, int64_t nr);
13 int ptcounter_value(struct ptcounter *ptc, uint64_t *sum);
14
15 #endif /* XFS_SCRUB_COUNTER_H_ */