xref: /openbsd-src/sys/dev/pci/drm/include/linux/swap.h (revision 4e1ee0786f11cc571bd0be17d38e46f635c719fc)
1 /* Public domain. */
2 
3 #ifndef _LINUX_SWAP_H
4 #define _LINUX_SWAP_H
5 
6 /*
7  * normally clock.h would be indirectly included via
8  *
9  * linux/swap.h
10  * linux/memcontrol.h
11  * linux/writeback.h
12  * linux/blk-cgroup.h
13  * linux/blkdev.h
14  * linux/sched/clock.h
15  */
16 #include <linux/sched/clock.h>
17 
18 #include <uvm/uvm_extern.h>
19 
20 static inline long
21 get_nr_swap_pages(void)
22 {
23 	return uvmexp.swpages - uvmexp.swpginuse;
24 }
25 
26 /*
27  * XXX For now, we don't want the shrinker to be too aggressive, so
28  * pretend we're not called from the pagedaemon even if we are.
29  */
30 #define current_is_kswapd()	0
31 
32 #endif
33