1/* Public domain. */
2
3#ifndef _LINUX_PAGEVEC_H
4#define _LINUX_PAGEVEC_H
5
6#include <sys/types.h>
7#include <sys/systm.h>
8#include <sys/errno.h>
9
10#define PAGEVEC_SIZE 15
11
12struct folio_batch {
13};
14
15struct pagevec {
16	uint8_t	nr;
17	struct vm_page *pages[PAGEVEC_SIZE];
18};
19
20void __pagevec_release(struct pagevec *);
21
22static inline unsigned int
23pagevec_space(struct pagevec *pvec)
24{
25	return PAGEVEC_SIZE - pvec->nr;
26}
27
28static inline void
29pagevec_init(struct pagevec *pvec)
30{
31	pvec->nr = 0;
32}
33
34static inline void
35pagevec_reinit(struct pagevec *pvec)
36{
37	pvec->nr = 0;
38}
39
40static inline unsigned int
41pagevec_count(struct pagevec *pvec)
42{
43	return pvec->nr;
44}
45
46static inline unsigned int
47pagevec_add(struct pagevec *pvec, struct vm_page *page)
48{
49	pvec->pages[pvec->nr++] = page;
50	return PAGEVEC_SIZE - pvec->nr;
51}
52
53#endif
54