Fix pollution of application namespace by declarations of kernel
functions. The application header <sys/user.h> includes <vm/vm.h> which includes <vm/lock.h>... vm.h: Don't include <machine/cpufunc.h>. It is already included by <sys/systm.h> in the kernel and isn't designed to be included by applications (the 2.1 version causes a syntax error in C++ and the current version has initializers that are invalid in strict C++). lock.h: Only declare kernel functions if KERNEL is defined.
This commit is contained in:
parent
9cdeffd562
commit
f2caf6f548
|
@ -61,7 +61,7 @@
|
|||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: lock.h,v 1.3 1995/01/09 16:05:31 davidg Exp $
|
||||
* $Id: lock.h,v 1.4 1995/07/13 08:48:14 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -99,6 +99,7 @@ typedef struct lock *lock_t;
|
|||
#define lock_read_done(l) lock_done(l)
|
||||
#define lock_write_done(l) lock_done(l)
|
||||
|
||||
#ifdef KERNEL
|
||||
void lock_clear_recursive __P((lock_t));
|
||||
void lock_done __P((lock_t));
|
||||
void lock_init __P((lock_t, boolean_t));
|
||||
|
@ -111,5 +112,6 @@ boolean_t lock_try_read_to_write __P((lock_t));
|
|||
boolean_t lock_try_write __P((lock_t));
|
||||
void lock_write __P((lock_t));
|
||||
void lock_write_to_read __P((lock_t));
|
||||
#endif
|
||||
|
||||
#endif /* !_LOCK_H_ */
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vm.h 8.2 (Berkeley) 12/13/93
|
||||
* $Id: vm.h,v 1.4 1995/01/09 16:05:37 davidg Exp $
|
||||
* $Id: vm.h,v 1.5 1995/07/13 08:48:18 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef VM_H
|
||||
|
@ -56,7 +56,6 @@ typedef struct vm_page *vm_page_t;
|
|||
|
||||
#include <sys/vmmeter.h>
|
||||
#include <sys/queue.h>
|
||||
#include <machine/cpufunc.h>
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/lock.h>
|
||||
#include <vm/vm_prot.h>
|
||||
|
|
Loading…
Reference in New Issue