svn commit: r329905 - head/sys/vm

Konstantin Belousov kib at FreeBSD.org
Sat Feb 24 10:26:26 UTC 2018


Author: kib
Date: Sat Feb 24 10:26:26 2018
New Revision: 329905
URL: https://svnweb.freebsd.org/changeset/base/329905

Log:
  Hide all vm/vm_pageout.h content under #ifdef _KERNEL.
  
  There are no parts useful for usermode applications in
  vm/vm_pageout.h.  Even for the specific applications like fstat and
  lsof.
  
  In my opinion, this protection is redundant and instead userspace
  should not include the header at all.  Since there are apparently
  broken third party codebases, give them a bit of slack by providing
  transitional period.
  
  Reported by:	julian
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/vm/vm_pageout.h

Modified: head/sys/vm/vm_pageout.h
==============================================================================
--- head/sys/vm/vm_pageout.h	Sat Feb 24 08:44:51 2018	(r329904)
+++ head/sys/vm/vm_pageout.h	Sat Feb 24 10:26:26 2018	(r329905)
@@ -65,6 +65,8 @@
 #ifndef _VM_VM_PAGEOUT_H_
 #define _VM_VM_PAGEOUT_H_
 
+#ifdef _KERNEL
+
 /*
  *	Header file for pageout daemon.
  */
@@ -100,11 +102,10 @@ void vm_wait_domain(int domain);
 void vm_wait_min(void);
 void vm_wait_severe(void);
 
-#ifdef _KERNEL
 int vm_pageout_flush(vm_page_t *, int, int, int, int *, boolean_t *);
 void vm_pageout_oom(int shortage);
 
 void vm_swapout_run(void);
 void vm_swapout_run_idle(void);
-#endif
+#endif /* _KERNEL */
 #endif	/* _VM_VM_PAGEOUT_H_ */


More information about the svn-src-head mailing list