aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-12-29 04:46:21 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-12-29 04:46:21 +0000
commit664a31e4967a61ec61870f45adc2f1400617993e (patch)
treef6e6a9488aad27e9b1298da3083e214c1c209505 /sys/sys
parenta0b57fb738b797a1aa540b8360260b19b6470bc4 (diff)
downloadsrc-664a31e4967a61ec61870f45adc2f1400617993e.tar.gz
src-664a31e4967a61ec61870f45adc2f1400617993e.zip
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
Notes
Notes: svn path=/head/; revision=55205
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/_posix.h4
-rw-r--r--sys/sys/_sigset.h2
-rw-r--r--sys/sys/acct.h4
-rw-r--r--sys/sys/acl.h6
-rw-r--r--sys/sys/aio.h2
-rw-r--r--sys/sys/bio.h12
-rw-r--r--sys/sys/buf.h12
-rw-r--r--sys/sys/bus.h4
-rw-r--r--sys/sys/callout.h4
-rw-r--r--sys/sys/cdio.h2
-rw-r--r--sys/sys/chio.h2
-rw-r--r--sys/sys/clist.h2
-rw-r--r--sys/sys/conf.h6
-rw-r--r--sys/sys/cons.h4
-rw-r--r--sys/sys/consio.h2
-rw-r--r--sys/sys/ctype.h4
-rw-r--r--sys/sys/devicestat.h2
-rw-r--r--sys/sys/dirent.h2
-rw-r--r--sys/sys/disklabel.h8
-rw-r--r--sys/sys/diskmbr.h8
-rw-r--r--sys/sys/diskpc98.h8
-rw-r--r--sys/sys/diskslice.h6
-rw-r--r--sys/sys/dkstat.h2
-rw-r--r--sys/sys/dmap.h2
-rw-r--r--sys/sys/domain.h2
-rw-r--r--sys/sys/errno.h4
-rw-r--r--sys/sys/exec.h2
-rw-r--r--sys/sys/extattr.h4
-rw-r--r--sys/sys/fbio.h2
-rw-r--r--sys/sys/fcntl.h12
-rw-r--r--sys/sys/fdcio.h2
-rw-r--r--sys/sys/file.h6
-rw-r--r--sys/sys/filedesc.h2
-rw-r--r--sys/sys/imgact.h2
-rw-r--r--sys/sys/imgact_aout.h4
-rw-r--r--sys/sys/imgact_elf.h4
-rw-r--r--sys/sys/inflate.h4
-rw-r--r--sys/sys/ioccom.h4
-rw-r--r--sys/sys/ioctl.h2
-rw-r--r--sys/sys/ioctl_meteor.h4
-rw-r--r--sys/sys/ipc.h6
-rw-r--r--sys/sys/jail.h6
-rw-r--r--sys/sys/kbio.h2
-rw-r--r--sys/sys/kernel.h4
-rw-r--r--sys/sys/ktrace.h6
-rw-r--r--sys/sys/linedisc.h6
-rw-r--r--sys/sys/linker.h10
-rw-r--r--sys/sys/malloc.h8
-rw-r--r--sys/sys/mbuf.h4
-rw-r--r--sys/sys/md5.h2
-rw-r--r--sys/sys/memrange.h4
-rw-r--r--sys/sys/mman.h4
-rw-r--r--sys/sys/module.h6
-rw-r--r--sys/sys/mount.h10
-rw-r--r--sys/sys/msg.h8
-rw-r--r--sys/sys/msgbuf.h2
-rw-r--r--sys/sys/mtio.h6
-rw-r--r--sys/sys/namei.h4
-rw-r--r--sys/sys/param.h12
-rw-r--r--sys/sys/pipe.h2
-rw-r--r--sys/sys/poll.h4
-rw-r--r--sys/sys/proc.h6
-rw-r--r--sys/sys/protosw.h8
-rw-r--r--sys/sys/ptrace.h6
-rw-r--r--sys/sys/queue.h4
-rw-r--r--sys/sys/random.h4
-rw-r--r--sys/sys/resource.h4
-rw-r--r--sys/sys/resourcevar.h2
-rw-r--r--sys/sys/rman.h8
-rw-r--r--sys/sys/rtprio.h4
-rw-r--r--sys/sys/select.h2
-rw-r--r--sys/sys/selinfo.h2
-rw-r--r--sys/sys/sem.h8
-rw-r--r--sys/sys/shm.h6
-rw-r--r--sys/sys/signal.h2
-rw-r--r--sys/sys/signalvar.h4
-rw-r--r--sys/sys/smp.h4
-rw-r--r--sys/sys/snoop.h8
-rw-r--r--sys/sys/socket.h4
-rw-r--r--sys/sys/socketvar.h4
-rw-r--r--sys/sys/soundcard.h2
-rw-r--r--sys/sys/stat.h10
-rw-r--r--sys/sys/sysctl.h10
-rw-r--r--sys/sys/sysent.h4
-rw-r--r--sys/sys/syslog.h8
-rw-r--r--sys/sys/tablet.h2
-rw-r--r--sys/sys/termios.h4
-rw-r--r--sys/sys/time.h12
-rw-r--r--sys/sys/timepps.h6
-rw-r--r--sys/sys/times.h2
-rw-r--r--sys/sys/timetc.h12
-rw-r--r--sys/sys/timex.h8
-rw-r--r--sys/sys/tty.h6
-rw-r--r--sys/sys/types.h12
-rw-r--r--sys/sys/ucred.h4
-rw-r--r--sys/sys/uio.h6
-rw-r--r--sys/sys/un.h6
-rw-r--r--sys/sys/user.h8
-rw-r--r--sys/sys/utsname.h4
-rw-r--r--sys/sys/vmmeter.h2
-rw-r--r--sys/sys/vnode.h8
-rw-r--r--sys/sys/wait.h2
102 files changed, 261 insertions, 253 deletions
diff --git a/sys/sys/_posix.h b/sys/sys/_posix.h
index ea0436a93b54..d75a29547fa5 100644
--- a/sys/sys/_posix.h
+++ b/sys/sys/_posix.h
@@ -39,7 +39,7 @@
*
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#if !defined(KLD_MODULE)
#include "opt_posix.h"
@@ -93,5 +93,5 @@
#define _P1003_1B_VISIBLE_HISTORICALLY
#endif
-#endif /* not KERNEL */
+#endif /* _KERNEL */
#endif /* _SYS__POSIX_H_ */
diff --git a/sys/sys/_sigset.h b/sys/sys/_sigset.h
index c137ec35db77..2e405a2d03cc 100644
--- a/sys/sys/_sigset.h
+++ b/sys/sys/_sigset.h
@@ -124,7 +124,7 @@ typedef void __sighandler_t __P((int));
#define SIG_IGN ((__sighandler_t *)1)
#define SIG_ERR ((__sighandler_t *)-1)
-#if defined(_P1003_1B_VISIBLE) || defined(KERNEL)
+#if defined(_P1003_1B_VISIBLE) || defined(_KERNEL)
union sigval {
/* Members as suggested by Annex C of POSIX 1003.1b. */
int sigval_int;
diff --git a/sys/sys/acct.h b/sys/sys/acct.h
index d59d974cb41e..fae78c8bf944 100644
--- a/sys/sys/acct.h
+++ b/sys/sys/acct.h
@@ -49,7 +49,7 @@
*/
typedef u_int16_t comp_t;
-#ifdef KERNEL
+#ifdef _KERNEL
#define __dev_t udev_t
#else
#define __dev_t dev_t
@@ -83,7 +83,7 @@ struct acct {
*/
#define AHZ 64
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
int acct_process __P((struct proc *p));
diff --git a/sys/sys/acl.h b/sys/sys/acl.h
index 3a13fab54214..deaffd92eb7e 100644
--- a/sys/sys/acl.h
+++ b/sys/sys/acl.h
@@ -93,7 +93,7 @@ typedef struct acl *acl_t;
#define ACL_PERM_BITS (ACL_PERM_EXEC | ACL_PERM_WRITE | ACL_PERM_READ)
#define ACL_POSIX1E_BITS (ACL_PERM_EXEC | ACL_PERM_WRITE | ACL_PERM_READ)
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Storage for ACLs and support structures
*/
@@ -124,7 +124,7 @@ int generic_vop_getacl(struct vop_getacl_args *ap);
int generic_vop_aclcheck(struct vop_aclcheck_args *ap);
int posix1e_vop_aclcheck(struct vop_aclcheck_args *ap);
-#else /* KERNEL */
+#else /* _KERNEL */
/*
* Syscall interface -- use the library calls instead as the syscalls
@@ -165,5 +165,5 @@ int acl_valid_file(const char *path_p, acl_type_t type, acl_t acl);
int acl_valid_fd(int fd, acl_type_t type, acl_t acl);
int acl_free(void *obj_p);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _SYS_ACL_H */
diff --git a/sys/sys/aio.h b/sys/sys/aio.h
index 68a5698503d1..b74eadddd7c0 100644
--- a/sys/sys/aio.h
+++ b/sys/sys/aio.h
@@ -89,7 +89,7 @@ typedef struct aiocb {
struct __aiocb_private _aiocb_private;
} aiocb_t;
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
/*
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index f244a5f87ad4..7168a894e993 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -238,7 +238,7 @@ struct buf {
#define NOOFFSET (-1LL) /* No buffer offset calculated yet */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Buffer locking
*/
@@ -342,7 +342,7 @@ BUF_REFCNT(struct buf *bp)
return ret;
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
struct buf_queue_head {
TAILQ_HEAD(buf_queue, buf) queue;
@@ -365,7 +365,7 @@ struct cluster_save {
struct buf **bs_children; /* List of associated buffers. */
};
-#ifdef KERNEL
+#ifdef _KERNEL
static __inline void bufq_init __P((struct buf_queue_head *head));
static __inline void bufq_insert_tail __P((struct buf_queue_head *head,
@@ -417,7 +417,7 @@ bufq_first(struct buf_queue_head *head)
return (TAILQ_FIRST(&head->queue));
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Definitions for the buffer free lists.
@@ -443,7 +443,7 @@ bufq_first(struct buf_queue_head *head)
#define B_CLRBUF 0x01 /* Request allocated buffer be cleared. */
#define B_SYNC 0x02 /* Do all allocations synchronously. */
-#ifdef KERNEL
+#ifdef _KERNEL
extern int nbuf; /* The number of buffer headers */
extern int buf_maxio; /* nominal maximum I/O for buffer */
extern struct buf *buf; /* The buffer headers. */
@@ -507,6 +507,6 @@ void reassignbuf __P((struct buf *, struct vnode *));
void pbreassignbuf __P((struct buf *, struct vnode *));
struct buf *trypbuf __P((int *));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_BUF_H_ */
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index f244a5f87ad4..7168a894e993 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -238,7 +238,7 @@ struct buf {
#define NOOFFSET (-1LL) /* No buffer offset calculated yet */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Buffer locking
*/
@@ -342,7 +342,7 @@ BUF_REFCNT(struct buf *bp)
return ret;
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
struct buf_queue_head {
TAILQ_HEAD(buf_queue, buf) queue;
@@ -365,7 +365,7 @@ struct cluster_save {
struct buf **bs_children; /* List of associated buffers. */
};
-#ifdef KERNEL
+#ifdef _KERNEL
static __inline void bufq_init __P((struct buf_queue_head *head));
static __inline void bufq_insert_tail __P((struct buf_queue_head *head,
@@ -417,7 +417,7 @@ bufq_first(struct buf_queue_head *head)
return (TAILQ_FIRST(&head->queue));
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Definitions for the buffer free lists.
@@ -443,7 +443,7 @@ bufq_first(struct buf_queue_head *head)
#define B_CLRBUF 0x01 /* Request allocated buffer be cleared. */
#define B_SYNC 0x02 /* Do all allocations synchronously. */
-#ifdef KERNEL
+#ifdef _KERNEL
extern int nbuf; /* The number of buffer headers */
extern int buf_maxio; /* nominal maximum I/O for buffer */
extern struct buf *buf; /* The buffer headers. */
@@ -507,6 +507,6 @@ void reassignbuf __P((struct buf *, struct vnode *));
void pbreassignbuf __P((struct buf *, struct vnode *));
struct buf *trypbuf __P((int *));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_BUF_H_ */
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index a3cea1555d06..84176db97551 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -29,7 +29,7 @@
#ifndef _SYS_BUS_H_
#define _SYS_BUS_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/queue.h>
@@ -364,6 +364,6 @@ static moduledata_t name##_##busname##_mod = { \
DECLARE_MODULE(name##_##busname, name##_##busname##_mod, \
SI_SUB_DRIVERS, SI_ORDER_MIDDLE)
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_BUS_H_ */
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index a3cfcc24a80c..c83bf442c707 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -66,7 +66,7 @@ struct callout_handle {
struct callout *callout;
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct callout_list callfree;
extern struct callout *callout;
extern int ncallout;
@@ -80,6 +80,6 @@ void callout_init __P((struct callout *));
void callout_reset __P((struct callout *, int, void (*)(void *), void *));
void callout_stop __P((struct callout *));
-#endif /* KERNEL */
+#endif
#endif /* _SYS_CALLOUT_H_ */
diff --git a/sys/sys/cdio.h b/sys/sys/cdio.h
index dbb0f29f9abc..12d18cf67830 100644
--- a/sys/sys/cdio.h
+++ b/sys/sys/cdio.h
@@ -26,7 +26,7 @@
#ifndef _SYS_CDIO_H_
#define _SYS_CDIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/chio.h b/sys/sys/chio.h
index 7a2403f27dd3..78e2248e995f 100644
--- a/sys/sys/chio.h
+++ b/sys/sys/chio.h
@@ -35,7 +35,7 @@
#ifndef _SYS_CHIO_H_
#define _SYS_CHIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/clist.h b/sys/sys/clist.h
index d1c22fa3d599..60b56ecf43de 100644
--- a/sys/sys/clist.h
+++ b/sys/sys/clist.h
@@ -43,7 +43,7 @@ struct cblock {
unsigned char c_info[CBSIZE]; /* characters */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct cblock *cfree;
extern int cfreecount;
#endif
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index e192b7cd86ca..f4f611277453 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -191,7 +191,7 @@ struct linesw {
u_char l_hotchar;
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct linesw linesw[];
extern int nlinesw;
@@ -214,7 +214,7 @@ struct swdevt {
#define SW_SEQUENTIAL 0x02
#define sw_freed sw_flags /* XXX compat */
-#ifdef KERNEL
+#ifdef _KERNEL
d_open_t noopen;
d_close_t noclose;
d_read_t noread;
@@ -285,6 +285,6 @@ extern devfs_create_t *devfs_create_hook;
#define GID_GAMES 13
#define GID_DIALER 68
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_CONF_H_ */
diff --git a/sys/sys/cons.h b/sys/sys/cons.h
index b6414a1244ca..7314dbcf993b 100644
--- a/sys/sys/cons.h
+++ b/sys/sys/cons.h
@@ -74,7 +74,7 @@ struct consdev {
#define CN_INTERNAL 2 /* "internal" bit-mapped display */
#define CN_REMOTE 3 /* serial interface with remote bit set */
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct linker_set cons_set;
extern int cons_unavail;
extern struct consdev *cn_tab;
@@ -92,6 +92,6 @@ void cninit __P((void));
void cninit_finish __P((void));
void cnputc __P((int));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_CONS_H_ */
diff --git a/sys/sys/consio.h b/sys/sys/consio.h
index d121457cfc66..ae0fe802aacb 100644
--- a/sys/sys/consio.h
+++ b/sys/sys/consio.h
@@ -31,7 +31,7 @@
#ifndef _SYS_CONSIO_H_
#define _SYS_CONSIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/ctype.h b/sys/sys/ctype.h
index 9144b0e725f1..b306e85e762c 100644
--- a/sys/sys/ctype.h
+++ b/sys/sys/ctype.h
@@ -41,7 +41,7 @@
#ifndef _SYS_CTYPE_H_
#define _SYS_CTYPE_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#define isspace(c) ((c) == ' ' || ((c) >= '\t' && (c) <= '\r'))
#define isascii(c) (((c) & ~0x7f) == 0)
@@ -56,5 +56,5 @@
#define toupper(c) ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z')))
#define tolower(c) ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z')))
-#endif /* KERNEL */
+#endif
#endif /* !_SYS_CTYPE_H_ */
diff --git a/sys/sys/devicestat.h b/sys/sys/devicestat.h
index 1e17d5117c62..172ff75540b1 100644
--- a/sys/sys/devicestat.h
+++ b/sys/sys/devicestat.h
@@ -205,7 +205,7 @@ struct devstat {
devstat_priority priority; /* Controls list pos. */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct buf;
void devstat_add_entry(struct devstat *ds, const char *dev_name,
int unit_number, u_int32_t block_size,
diff --git a/sys/sys/dirent.h b/sys/sys/dirent.h
index 19db37ba43e7..b9c39d1b4972 100644
--- a/sys/sys/dirent.h
+++ b/sys/sys/dirent.h
@@ -91,7 +91,7 @@ struct dirent {
#define _GENERIC_DIRSIZ(dp) \
((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-#ifdef KERNEL
+#ifdef _KERNEL
#define GENERIC_DIRSIZ(dp) _GENERIC_DIRSIZ(dp)
#endif
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index 71e023647756..5c5d7463b29b 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -37,7 +37,7 @@
#ifndef _SYS_DISKLABEL_H_
#define _SYS_DISKLABEL_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -389,7 +389,7 @@ struct dos_partition {
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX encoding of disk minor numbers, should be elsewhere.
@@ -454,11 +454,11 @@ int writedisklabel __P((dev_t dev, struct disklabel *lp));
void alpha_fix_srm_checksum __P((struct buf *bp));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* LOCORE */
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
struct disklabel *getdiskbyname __P((const char *));
__END_DECLS
diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h
index 71e023647756..5c5d7463b29b 100644
--- a/sys/sys/diskmbr.h
+++ b/sys/sys/diskmbr.h
@@ -37,7 +37,7 @@
#ifndef _SYS_DISKLABEL_H_
#define _SYS_DISKLABEL_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -389,7 +389,7 @@ struct dos_partition {
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX encoding of disk minor numbers, should be elsewhere.
@@ -454,11 +454,11 @@ int writedisklabel __P((dev_t dev, struct disklabel *lp));
void alpha_fix_srm_checksum __P((struct buf *bp));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* LOCORE */
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
struct disklabel *getdiskbyname __P((const char *));
__END_DECLS
diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h
index 71e023647756..5c5d7463b29b 100644
--- a/sys/sys/diskpc98.h
+++ b/sys/sys/diskpc98.h
@@ -37,7 +37,7 @@
#ifndef _SYS_DISKLABEL_H_
#define _SYS_DISKLABEL_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -389,7 +389,7 @@ struct dos_partition {
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX encoding of disk minor numbers, should be elsewhere.
@@ -454,11 +454,11 @@ int writedisklabel __P((dev_t dev, struct disklabel *lp));
void alpha_fix_srm_checksum __P((struct buf *bp));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* LOCORE */
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
struct disklabel *getdiskbyname __P((const char *));
__END_DECLS
diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h
index 883a8800ef4e..8efb1a3238ae 100644
--- a/sys/sys/diskslice.h
+++ b/sys/sys/diskslice.h
@@ -29,7 +29,7 @@
#ifndef _SYS_DISKSLICE_H_
#define _SYS_DISKSLICE_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -79,7 +79,7 @@ struct diskslices {
dss_slices[MAX_SLICES]; /* actually usually less */
};
-#ifdef KERNEL
+#ifdef _KERNEL
/* Flags for dsopen(). */
#define DSO_NOLABELS 1
@@ -105,6 +105,6 @@ int dsopen __P((dev_t dev, int mode, u_int flags,
struct diskslices **sspp, struct disklabel *lp));
int dssize __P((dev_t dev, struct diskslices **sspp));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_DISKSLICE_H_ */
diff --git a/sys/sys/dkstat.h b/sys/sys/dkstat.h
index c62d6ce1350f..760219c190ef 100644
--- a/sys/sys/dkstat.h
+++ b/sys/sys/dkstat.h
@@ -49,7 +49,7 @@
#define CP_IDLE 4
#define CPUSTATES 5
-#ifdef KERNEL
+#ifdef _KERNEL
extern long tk_cancc;
extern long tk_nin;
diff --git a/sys/sys/dmap.h b/sys/sys/dmap.h
index 793176086738..48a44df0df1a 100644
--- a/sys/sys/dmap.h
+++ b/sys/sys/dmap.h
@@ -48,7 +48,7 @@ struct dmap {
swblk_t dm_alloc; /* amount of physical swap space allocated */
swblk_t dm_map[NDMAP]; /* first disk block number in each chunk */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct dmap zdmap;
extern int dmmin, dmmax, dmtext;
#endif
diff --git a/sys/sys/domain.h b/sys/sys/domain.h
index 3b7f14c37aac..c921c04d69b4 100644
--- a/sys/sys/domain.h
+++ b/sys/sys/domain.h
@@ -63,7 +63,7 @@ struct domain {
int dom_maxrtkey; /* for routing layer */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct domain *domains;
extern struct domain localdomain;
extern void net_add_domain(void *);
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index c25b6afef90d..b8ba98a797d0 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -42,7 +42,7 @@
#ifndef _SYS_ERRNO_H_
#define _SYS_ERRNO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
int * __error __P((void));
@@ -170,7 +170,7 @@ __END_DECLS
#endif /* _POSIX_SOURCE */
-#ifdef KERNEL
+#ifdef _KERNEL
/* pseudo-errors returned inside kernel to modify return to process */
#define ERESTART (-1) /* restart syscall */
#define EJUSTRETURN (-2) /* don't modify regs, just return */
diff --git a/sys/sys/exec.h b/sys/sys/exec.h
index d58fbe89ac4d..58e1c652a410 100644
--- a/sys/sys/exec.h
+++ b/sys/sys/exec.h
@@ -72,7 +72,7 @@ struct execsw {
#include <machine/exec.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/cdefs.h>
int exec_map_first_page __P((struct image_params *));
diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h
index d81be11bd756..617214543768 100644
--- a/sys/sys/extattr.h
+++ b/sys/sys/extattr.h
@@ -44,7 +44,7 @@
#define EXTATTR_MAXNAMELEN NAME_MAX
-#ifndef KERNEL
+#ifndef _KERNEL
int extattrctl(char *path, int cmd, char *attrname, caddr_t arg);
int extattr_set_file(char *path, char *attrname, struct iovec *iovp,
@@ -53,5 +53,5 @@ int extattr_get_file(char *path, char *attrname, struct iovec *iovp,
u_int iovcnt);
int extattr_delete_file(char *path, char *attrname);
-#endif /* KERNEL */
+#endif
#endif /* _SYS_EXTATTR_H_ */
diff --git a/sys/sys/fbio.h b/sys/sys/fbio.h
index b2413ead61ed..f6a969988f4a 100644
--- a/sys/sys/fbio.h
+++ b/sys/sys/fbio.h
@@ -42,7 +42,7 @@
#ifndef _SYS_FBIO_H_
#define _SYS_FBIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h
index b81f904daaba..d5b29e656f23 100644
--- a/sys/sys/fcntl.h
+++ b/sys/sys/fcntl.h
@@ -48,7 +48,7 @@
* related kernel definitions.
*/
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
@@ -70,7 +70,7 @@
* independently testable: 1 greater than the above.
*
* XXX
- * FREAD and FWRITE are excluded from the #ifdef KERNEL so that TIOCFLUSH,
+ * FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
* which was documented to use FREAD/FWRITE, continues to work.
*/
#ifndef _POSIX_SOURCE
@@ -89,7 +89,7 @@
#define O_CREAT 0x0200 /* create if nonexistent */
#define O_TRUNC 0x0400 /* truncate to zero length */
#define O_EXCL 0x0800 /* error if already exists */
-#ifdef KERNEL
+#ifdef _KERNEL
#define FMARK 0x1000 /* mark during gc() */
#define FDEFER 0x2000 /* defer for next gc pass */
#define FHASLOCK 0x4000 /* descriptor holds advisory lock */
@@ -98,7 +98,7 @@
/* Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. */
#define O_NOCTTY 0x8000 /* don't assign controlling terminal */
-#ifdef KERNEL
+#ifdef _KERNEL
/* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */
#define FFLAGS(oflags) ((oflags) + 1)
#define OFLAGS(fflags) ((fflags) - 1)
@@ -148,7 +148,7 @@
#define F_RDLCK 1 /* shared or read lock */
#define F_UNLCK 2 /* unlock */
#define F_WRLCK 3 /* exclusive or write lock */
-#ifdef KERNEL
+#ifdef _KERNEL
#define F_WAIT 0x010 /* Wait until lock is granted */
#define F_FLOCK 0x020 /* Use flock(2) semantics for lock */
#define F_POSIX 0x040 /* Use POSIX semantics for lock */
@@ -176,7 +176,7 @@ struct flock {
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
diff --git a/sys/sys/fdcio.h b/sys/sys/fdcio.h
index 3b4da37da238..92724df1356e 100644
--- a/sys/sys/fdcio.h
+++ b/sys/sys/fdcio.h
@@ -30,7 +30,7 @@
#ifndef _MACHINE_IOCTL_FD_H_
#define _MACHINE_IOCTL_FD_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/file.h b/sys/sys/file.h
index 014a2931b673..9ed6ac4827e7 100644
--- a/sys/sys/file.h
+++ b/sys/sys/file.h
@@ -37,12 +37,12 @@
#ifndef _SYS_FILE_H_
#define _SYS_FILE_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/fcntl.h>
#include <sys/unistd.h>
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/queue.h>
struct stat;
@@ -211,6 +211,6 @@ fo_close(fp, p)
return ((*fp->f_ops->fo_close)(fp, p));
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !SYS_FILE_H */
diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h
index d27611209517..d383c1fde090 100644
--- a/sys/sys/filedesc.h
+++ b/sys/sys/filedesc.h
@@ -118,7 +118,7 @@ struct sigio {
SLIST_HEAD(sigiolst, sigio);
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Kernel global variables and routines.
*/
diff --git a/sys/sys/imgact.h b/sys/sys/imgact.h
index 83ed79c34999..9cb2e3580554 100644
--- a/sys/sys/imgact.h
+++ b/sys/sys/imgact.h
@@ -58,7 +58,7 @@ struct image_params {
unsigned long ps_strings; /* PS_STRINGS for BSD/OS binaries */
};
-#ifdef KERNEL
+#ifdef _KERNEL
int exec_check_permissions __P((struct image_params *));
int exec_extract_strings __P((struct image_params *));
int exec_new_vmspace __P((struct image_params *));
diff --git a/sys/sys/imgact_aout.h b/sys/sys/imgact_aout.h
index 6f7cd0cb024e..ed276c63cff6 100644
--- a/sys/sys/imgact_aout.h
+++ b/sys/sys/imgact_aout.h
@@ -147,10 +147,10 @@ struct exec {
#define EX_DYNAMIC 0x20 /* contains run-time link-edit info */
#define EX_DPMASK 0x30 /* mask for the above */
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
int aout_coredump __P((struct proc *p, struct vnode *vp, off_t limit));
-#endif /* KERNEL */
+#endif
#endif /* !_IMGACT_AOUT_H_ */
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index 3c6e7ec96c31..065d5b592fb5 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -33,7 +33,7 @@
#include <machine/elf.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);}
@@ -105,6 +105,6 @@ struct proc;
int elf_coredump __P((struct proc *, struct vnode *, off_t));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_IMGACT_ELF_H_ */
diff --git a/sys/sys/inflate.h b/sys/sys/inflate.h
index 8b1e95de1958..05ccf17f7c88 100644
--- a/sys/sys/inflate.h
+++ b/sys/sys/inflate.h
@@ -12,7 +12,7 @@
#ifndef _SYS_INFLATE_H_
#define _SYS_INFLATE_H_
-#if defined(KERNEL) || defined(KZIP)
+#if defined(_KERNEL) || defined(KZIP)
#define GZ_EOF -1
@@ -48,6 +48,6 @@ struct inflate {
int inflate __P((struct inflate *));
-#endif /* KERNEL || KZIP */
+#endif /* _KERNEL || KZIP */
#endif /* ! _SYS_INFLATE_H_ */
diff --git a/sys/sys/ioccom.h b/sys/sys/ioccom.h
index 3dc3c1e0164a..7e6fbde52245 100644
--- a/sys/sys/ioccom.h
+++ b/sys/sys/ioccom.h
@@ -62,7 +62,7 @@
/* this should be _IORW, but stdio got there first */
#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -70,6 +70,6 @@ __BEGIN_DECLS
int ioctl __P((int, unsigned long, ...));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif /* !_SYS_IOCCOM_H_ */
diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h
index 11a22c60434e..4888df72f876 100644
--- a/sys/sys/ioctl.h
+++ b/sys/sys/ioctl.h
@@ -42,7 +42,7 @@
#ifndef _SYS_IOCTL_H_
#define _SYS_IOCTL_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#warning "Don't #include ioctl.h in the kernel. Include xxxio.h instead."
#endif
diff --git a/sys/sys/ioctl_meteor.h b/sys/sys/ioctl_meteor.h
index 919100f8d534..f62d392ea0ae 100644
--- a/sys/sys/ioctl_meteor.h
+++ b/sys/sys/ioctl_meteor.h
@@ -27,6 +27,8 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
/*
* ioctl constants for Matrox Meteor Capture card.
@@ -35,7 +37,7 @@
#ifndef _MACHINE_IOCTL_METEOR_H_
#define _MACHINE_IOCTL_METEOR_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h
index d81c5bc9d118..38892e967202 100644
--- a/sys/sys/ipc.h
+++ b/sys/sys/ipc.h
@@ -76,7 +76,7 @@ struct ipc_perm {
#define IPC_SET 1 /* set options */
#define IPC_STAT 2 /* get options */
-#ifdef KERNEL
+#ifdef _KERNEL
/* Macros to convert between ipc ids and array indices or sequence ids */
#define IPCID_TO_IX(id) ((id) & 0xffff)
#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
@@ -85,7 +85,7 @@ struct ipc_perm {
struct proc;
int ipcperm __P((struct proc *, struct ipc_perm *, int));
-#else /* ! KERNEL */
+#else /* ! _KERNEL */
/* XXX doesn't really belong here, but has been historical practice in SysV. */
@@ -95,6 +95,6 @@ __BEGIN_DECLS
key_t ftok __P((const char *, int));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_IPC_H_ */
diff --git a/sys/sys/jail.h b/sys/sys/jail.h
index 87809673357b..7fa6dd0720ab 100644
--- a/sys/sys/jail.h
+++ b/sys/sys/jail.h
@@ -20,11 +20,11 @@ struct jail {
u_int32_t ip_number;
};
-#ifndef KERNEL
+#ifndef _KERNEL
int jail __P((struct jail *));
-#else /* KERNEL */
+#else /* _KERNEL */
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_PRISON);
@@ -43,5 +43,5 @@ struct prison {
void *pr_linux;
};
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_JAIL_H_ */
diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h
index a6f2b4886ac0..456173e4713e 100644
--- a/sys/sys/kbio.h
+++ b/sys/sys/kbio.h
@@ -5,7 +5,7 @@
#ifndef _SYS_KBIO_H_
#define _SYS_KBIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index 1dbc2159651b..eac0fe7d9d8b 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -47,7 +47,7 @@
#include <sys/linker_set.h>
-#ifdef KERNEL
+#ifdef _KERNEL
/* for intrhook below */
#include <sys/queue.h>
@@ -78,7 +78,7 @@ extern int lbolt; /* once a second sleep address */
extern int tickdelta;
extern long timedelta;
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Enumerated types for known system startup interfaces.
diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h
index dc3e120ed1bc..5383fc409a24 100644
--- a/sys/sys/ktrace.h
+++ b/sys/sys/ktrace.h
@@ -156,7 +156,7 @@ struct ktr_csw {
#define KTRFAC_INHERIT 0x40000000 /* pass trace flags to children */
#define KTRFAC_ACTIVE 0x20000000 /* ktrace logging in progress, ignore */
-#ifdef KERNEL
+#ifdef _KERNEL
void ktrnamei __P((struct vnode *,char *));
void ktrcsw __P((struct vnode *,int,int));
void ktrpsig __P((struct vnode *, int, sig_t, sigset_t *, int));
@@ -164,7 +164,7 @@ void ktrgenio __P((struct vnode *,int, enum uio_rw,struct iovec *,int,int));
void ktrsyscall __P((struct vnode *, int, int narg, register_t args[]));
void ktrsysret __P((struct vnode *, int, int, register_t));
-#else /* KERNEL */
+#else
#include <sys/cdefs.h>
@@ -173,6 +173,6 @@ int ktrace __P((const char *, int, int, pid_t));
int utrace __P((const void *, size_t));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif
diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h
index e192b7cd86ca..f4f611277453 100644
--- a/sys/sys/linedisc.h
+++ b/sys/sys/linedisc.h
@@ -191,7 +191,7 @@ struct linesw {
u_char l_hotchar;
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct linesw linesw[];
extern int nlinesw;
@@ -214,7 +214,7 @@ struct swdevt {
#define SW_SEQUENTIAL 0x02
#define sw_freed sw_flags /* XXX compat */
-#ifdef KERNEL
+#ifdef _KERNEL
d_open_t noopen;
d_close_t noclose;
d_read_t noread;
@@ -285,6 +285,6 @@ extern devfs_create_t *devfs_create_hook;
#define GID_GAMES 13
#define GID_DIALER 68
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_CONF_H_ */
diff --git a/sys/sys/linker.h b/sys/sys/linker.h
index 407aba14f8d1..8a1446f922da 100644
--- a/sys/sys/linker.h
+++ b/sys/sys/linker.h
@@ -29,7 +29,7 @@
#ifndef _SYS_LINKER_H_
#define _SYS_LINKER_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#include <machine/elf.h>
@@ -198,7 +198,7 @@ int linker_ddb_search_symbol(caddr_t value, c_linker_sym_t *sym, long *diffp);
int linker_ddb_symbol_values(c_linker_sym_t sym, linker_symval_t *symval);
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Module information subtypes
@@ -221,7 +221,7 @@ int linker_ddb_symbol_values(c_linker_sym_t sym, linker_symval_t *symval);
#define MODINFOMD_DEPLIST (0x4001 | MODINFOMD_NOCOPY) /* depends on */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Module lookup
@@ -257,7 +257,7 @@ int elf_reloc(linker_file_t lf, const void *rel, int type, const char *sym);
#define ELF_RELOC_REL 1
#define ELF_RELOC_RELA 2
-#endif /* KERNEL */
+#endif /* _KERNEL */
struct kld_file_stat {
int version; /* set to sizeof(linker_file_stat) */
@@ -276,7 +276,7 @@ struct kld_sym_lookup {
};
#define KLDSYM_LOOKUP 1
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index f0e62ec15969..ba85d9ca54b5 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -65,7 +65,7 @@ struct malloc_type {
u_short ks_mapblocks; /* number of times blocked for kernel map */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define MALLOC_DEFINE(type, shortdesc, longdesc) \
struct malloc_type type[1] = { \
{ NULL, 0, 0, 0, 0, 0, 0, M_MAGIC, shortdesc, 0, 0 } \
@@ -82,7 +82,7 @@ MALLOC_DECLARE(M_TEMP);
MALLOC_DECLARE(M_IP6OPT); /* for INET6 */
MALLOC_DECLARE(M_IP6NDP); /* for INET6 */
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Array of descriptors that describe the contents of each page
@@ -111,7 +111,7 @@ struct kmembuckets {
long kb_couldfree; /* over high water mark and could free */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define MINALLOCSIZE (1 << MINBUCKET)
#define BUCKETINDX(size) \
((size) <= (MINALLOCSIZE * 128) \
@@ -214,6 +214,6 @@ void free __P((void *addr, struct malloc_type *type));
void *malloc __P((unsigned long size, struct malloc_type *type, int flags));
void malloc_init __P((void *));
void malloc_uninit __P((void *));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_MALLOC_H_ */
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index f06be8f7bf7f..20ea44ce8122 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -497,7 +497,7 @@ union mcluster {
/* compatibility with 4.3 */
#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
-#ifdef KERNEL
+#ifdef _KERNEL
extern u_int m_clalloc_wid; /* mbuf cluster wait count */
extern u_int m_mballoc_wid; /* mbuf wait count */
extern int max_linkhdr; /* largest link-level header */
@@ -538,6 +538,6 @@ struct mbuf *m_pullup __P((struct mbuf *, int));
struct mbuf *m_retry __P((int, int));
struct mbuf *m_retryhdr __P((int, int));
struct mbuf *m_split __P((struct mbuf *,int,int));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_MBUF_H_ */
diff --git a/sys/sys/md5.h b/sys/sys/md5.h
index a69f79099560..48b30ab693c7 100644
--- a/sys/sys/md5.h
+++ b/sys/sys/md5.h
@@ -43,7 +43,7 @@ void MD5Final (unsigned char [16], MD5_CTX *);
char * MD5End(MD5_CTX *, char *);
char * MD5File(const char *, char *);
char * MD5Data(const unsigned char *, unsigned int, char *);
-#ifdef KERNEL
+#ifdef _KERNEL
void MD5Transform __P((u_int32_t [4], const unsigned char [64]));
#endif
__END_DECLS
diff --git a/sys/sys/memrange.h b/sys/sys/memrange.h
index 363a5f09904c..36e354df49c7 100644
--- a/sys/sys/memrange.h
+++ b/sys/sys/memrange.h
@@ -1,5 +1,7 @@
/*
* Memory range attribute operations, peformed on /dev/mem
+ *
+ * $FreeBSD$
*/
/* Memory range attributes */
@@ -38,7 +40,7 @@ struct mem_range_op
#define MEMRANGE_GET _IOWR('m', 50, struct mem_range_op)
#define MEMRANGE_SET _IOW('m', 51, struct mem_range_op)
-#ifdef KERNEL
+#ifdef _KERNEL
MALLOC_DECLARE(M_MEMDESC);
diff --git a/sys/sys/mman.h b/sys/sys/mman.h
index 80ac51bd24fe..0ff4dff42b76 100644
--- a/sys/sys/mman.h
+++ b/sys/sys/mman.h
@@ -116,7 +116,7 @@
#define MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */
#define MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -143,6 +143,6 @@ int minherit __P((void *, size_t, int));
#endif
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif
diff --git a/sys/sys/module.h b/sys/sys/module.h
index d95ae14db65c..800f45aa4195 100644
--- a/sys/sys/module.h
+++ b/sys/sys/module.h
@@ -60,7 +60,7 @@ typedef union modspecific {
u_long ulongval;
} modspecific_t;
-#ifdef KERNEL
+#ifdef _KERNEL
#define DECLARE_MODULE(name, data, sub, order) \
SYSINIT(name##module, sub, order, module_register_init, &data) \
@@ -94,7 +94,7 @@ extern int mod_debug;
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#define MAXMODNAME 32
@@ -106,7 +106,7 @@ struct module_stat {
modspecific_t data;
};
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 51743e90295d..49924236fb16 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -39,11 +39,11 @@
#include <sys/ucred.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#include <sys/stat.h>
#endif /* !_POSIX_C_SOURCE */
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#include <sys/queue.h>
#include <sys/lock.h>
@@ -291,7 +291,7 @@ struct ovfsconf {
#define VFCF_LOOPBACK 0x00100000 /* aliases some other mounted FS */
#define VFCF_UNICODE 0x00200000 /* stores file names as Unicode*/
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_MOUNT);
@@ -447,7 +447,7 @@ int vfs_stduninit __P((struct vfsconf *));
int vfs_stdextattrctl __P((struct mount *mp, int cmd, char *attrname,
caddr_t arg, struct proc *p));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -475,6 +475,6 @@ int vfsisloadable __P((const char *));
int vfsload __P((const char *));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_MOUNT_H_ */
diff --git a/sys/sys/msg.h b/sys/sys/msg.h
index 3dd70f1bc89d..bb63f9259c2b 100644
--- a/sys/sys/msg.h
+++ b/sys/sys/msg.h
@@ -92,7 +92,7 @@ struct msginfo {
msgssz, /* size of a message segment (see notes above) */
msgseg; /* number of message segments */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct msginfo msginfo;
#ifndef MSGSSZ
@@ -141,9 +141,9 @@ extern struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */
#define MSG_LOCKED 01000 /* Is this msqid_ds locked? */
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@@ -153,6 +153,6 @@ int msgget __P((key_t, int));
int msgsnd __P((int, void *, size_t, int));
int msgrcv __P((int, void*, size_t, long, int));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif /* !_SYS_MSG_H_ */
diff --git a/sys/sys/msgbuf.h b/sys/sys/msgbuf.h
index aa7df03e7915..cdab88457ddd 100644
--- a/sys/sys/msgbuf.h
+++ b/sys/sys/msgbuf.h
@@ -46,7 +46,7 @@ struct msgbuf {
char * msg_ptr; /* pointer to buffer */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern int msgbufmapped;
extern struct msgbuf *msgbufp;
void msgbufinit __P((void *ptr, size_t size));
diff --git a/sys/sys/mtio.h b/sys/sys/mtio.h
index 30b8b993819e..e41a28246fd5 100644
--- a/sys/sys/mtio.h
+++ b/sys/sys/mtio.h
@@ -37,7 +37,7 @@
#ifndef _SYS_MTIO_H_
#define _SYS_MTIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -224,11 +224,11 @@ union mterrstat {
/* Get current EOT model */
#define MTIOCGETEOTMODEL _IOR('m', 8, u_int32_t)
-#ifndef KERNEL
+#ifndef _KERNEL
#define DEFTAPE "/dev/nrsa0"
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* minor device number
*/
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index 29e35e1ab287..e42f8a1517cd 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -93,7 +93,7 @@ struct nameidata {
} ni_cnd;
};
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* namei operations
*/
@@ -206,7 +206,7 @@ NDINIT(ndp, op, flags, segflg, namep, p)
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
int namei __P((struct nameidata *ndp));
int lookup __P((struct nameidata *ndp));
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 6834ac040cbf..a49fcc0885ac 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -76,7 +76,7 @@
#define MAXHOSTNAMELEN 256 /* max hostname size */
/* More types and definitions used throughout the kernel. */
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/cdefs.h>
#include <sys/errno.h>
#include <sys/time.h>
@@ -85,14 +85,14 @@
#define TRUE 1
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
/* Signals. */
#include <sys/signal.h>
#endif
/* Machine type dependent parameters. */
#include <machine/param.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <machine/limits.h>
#endif
@@ -122,7 +122,7 @@
#define NBPW sizeof(int) /* number of bytes per word (integer) */
#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
-#ifdef KERNEL
+#ifdef _KERNEL
#define NODEV (dev_t)(-1) /* non-existent device */
#define NOUDEV (udev_t)(-1) /* non-existent device */
#define NOMAJ 256 /* non-existent device */
@@ -192,7 +192,7 @@
#define powerof2(x) ((((x)-1)&(x))==0)
/* Macros for min/max. */
-#ifndef KERNEL
+#ifndef _KERNEL
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
@@ -244,7 +244,7 @@
* Make this available for most of the kernel. There were too many
* things that included sys/systm.h just for panic().
*/
-#ifdef KERNEL
+#ifdef _KERNEL
void panic __P((const char *, ...)) __dead2 __printflike(1, 2);
#endif
diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h
index 548e782a42e9..7dec8286246e 100644
--- a/sys/sys/pipe.h
+++ b/sys/sys/pipe.h
@@ -24,7 +24,7 @@
#ifndef _SYS_PIPE_H_
#define _SYS_PIPE_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/time.h> /* for struct timespec */
#include <sys/select.h> /* for struct selinfo */
#include <vm/vm.h> /* for vm_page_t */
diff --git a/sys/sys/poll.h b/sys/sys/poll.h
index 7620a39bd512..a2ba6de38940 100644
--- a/sys/sys/poll.h
+++ b/sys/sys/poll.h
@@ -89,7 +89,7 @@ struct pollfd {
*/
#define INFTIM (-1)
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -103,6 +103,6 @@ __BEGIN_DECLS
int poll __P((struct pollfd *_pfd, unsigned _nfds, int _timeout));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_POLL_H_ */
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 400855c87379..f6af6d91b664 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -48,7 +48,7 @@
#include <sys/queue.h>
#include <sys/rtprio.h> /* For struct rtprio. */
#include <sys/signal.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/time.h> /* For structs itimerval, timeval. */
#endif
#include <sys/ucred.h>
@@ -304,7 +304,7 @@ struct pcred {
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_SESSION);
@@ -440,6 +440,6 @@ void faultin __P((struct proc *p));
struct proc * chooseproc __P((void));
u_int32_t procrunnable __P((void));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_PROC_H_ */
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h
index 15f6e13aef55..5f23fa3f9626 100644
--- a/sys/sys/protosw.h
+++ b/sys/sys/protosw.h
@@ -44,7 +44,7 @@ struct sockaddr;
struct socket;
struct sockopt;
-/*#ifdef KERNEL*/
+/*#ifdef _KERNEL*/
/*
* Protocol switch table.
*
@@ -165,7 +165,7 @@ char *prurequests[] = {
};
#endif
-#ifdef KERNEL /* users shouldn't see this decl */
+#ifdef _KERNEL /* users shouldn't see this decl */
struct ifnet;
struct stat;
@@ -240,7 +240,7 @@ int pru_rcvd_notsupp __P((struct socket *so, int flags));
int pru_rcvoob_notsupp __P((struct socket *so, struct mbuf *m, int flags));
int pru_sense_null __P((struct socket *so, struct stat *sb));
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* The arguments to the ctlinput routine are
@@ -310,7 +310,7 @@ char *prcorequests[] = {
};
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
void pfctlinput __P((int, struct sockaddr *));
struct protosw *pffindproto __P((int family, int protocol, int type));
struct protosw *pffindtype __P((int family, int type));
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index f7f77edeec81..62c2d676bde7 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -54,12 +54,12 @@
#define PT_FIRSTMACH 32 /* for machine-specific requests */
#include <machine/ptrace.h> /* machine-specific requests, if any */
-#ifdef KERNEL
+#ifdef _KERNEL
void proc_reparent __P((struct proc *child, struct proc *newparent));
int ptrace_set_pc __P((struct proc *p, unsigned long addr));
int ptrace_single_step __P((struct proc *p));
int ptrace_write_u __P((struct proc *p, vm_offset_t off, long data));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -67,6 +67,6 @@ __BEGIN_DECLS
int ptrace __P((int _request, pid_t _pid, caddr_t _addr, int _data));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_PTRACE_H_ */
diff --git a/sys/sys/queue.h b/sys/sys/queue.h
index be4c8b7e7b54..dbaaa00d6809 100644
--- a/sys/sys/queue.h
+++ b/sys/sys/queue.h
@@ -481,7 +481,7 @@ struct { \
(elm)->field.cqe_next; \
} while (0)
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX insque() and remque() are an old way of handling certain queues.
@@ -523,6 +523,6 @@ void remque __P((void *a));
#endif /* __GNUC__ */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_QUEUE_H_ */
diff --git a/sys/sys/random.h b/sys/sys/random.h
index e084f8111d1e..5a3cbe247f23 100644
--- a/sys/sys/random.h
+++ b/sys/sys/random.h
@@ -56,7 +56,7 @@
#define MEM_CLEARIRQ _IOW('r', 2, u_int16_t) /* clear interrupt */
#define MEM_RETURNIRQ _IOR('r', 3, u_int16_t) /* return interrupt */
-#ifdef KERNEL
+#ifdef _KERNEL
/* Type of the cookie passed to add_interrupt_randomness. */
@@ -85,6 +85,6 @@ u_int write_random(const char *buf, u_int nbytes);
#endif
int random_poll(dev_t dev, int events, struct proc *p);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_RANDOM_H_ */
diff --git a/sys/sys/resource.h b/sys/sys/resource.h
index 5b8491e2fefa..a1220c00a7f9 100644
--- a/sys/sys/resource.h
+++ b/sys/sys/resource.h
@@ -129,7 +129,7 @@ struct loadavg {
long fscale;
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct loadavg averunnable;
#else
@@ -143,5 +143,5 @@ int setpriority __P((int, int, int));
int setrlimit __P((int, const struct rlimit *));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_RESOURCE_H_ */
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h
index eca8e47d968e..92ed5bf687bd 100644
--- a/sys/sys/resourcevar.h
+++ b/sys/sys/resourcevar.h
@@ -83,7 +83,7 @@ struct plimit {
rlim_t p_cpulimit; /* current cpu limit in usec */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
void addupc_intr __P((struct proc *p, u_long pc, u_int ticks));
diff --git a/sys/sys/rman.h b/sys/sys/rman.h
index 6283f315ce1e..0e59f75fced4 100644
--- a/sys/sys/rman.h
+++ b/sys/sys/rman.h
@@ -32,9 +32,9 @@
#ifndef _SYS_RMAN_H_
#define _SYS_RMAN_H_ 1
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/queue.h>
-#endif /* !KERNEL */
+#endif
/*
* We use a linked list rather than a bitmap because we need to be able to
@@ -77,7 +77,7 @@ struct rman {
};
TAILQ_HEAD(rman_head, rman);
-#ifdef KERNEL
+#ifdef _KERNEL
int rman_activate_resource(struct resource *r);
int rman_await_resource(struct resource *r, int pri, int timo);
@@ -101,6 +101,6 @@ struct resource *rman_reserve_resource(struct rman *rm, u_long start,
#define rman_get_bushandle(r) ((r)->r_bushandle)
extern struct rman_head rman_head;
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_RMAN_H_ */
diff --git a/sys/sys/rtprio.h b/sys/sys/rtprio.h
index 5d115f5693db..5178b0e4ea69 100644
--- a/sys/sys/rtprio.h
+++ b/sys/sys/rtprio.h
@@ -70,11 +70,11 @@ struct rtprio {
};
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
int rtprio __P((int, pid_t, struct rtprio *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_RTPRIO_H_ */
diff --git a/sys/sys/select.h b/sys/sys/select.h
index 89e7f9adcbbc..8f58d858ba07 100644
--- a/sys/sys/select.h
+++ b/sys/sys/select.h
@@ -47,7 +47,7 @@ struct selinfo {
};
#define SI_COLL 0x0001 /* collision occurred */
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
void selrecord __P((struct proc *selector, struct selinfo *));
diff --git a/sys/sys/selinfo.h b/sys/sys/selinfo.h
index 89e7f9adcbbc..8f58d858ba07 100644
--- a/sys/sys/selinfo.h
+++ b/sys/sys/selinfo.h
@@ -47,7 +47,7 @@ struct selinfo {
};
#define SI_COLL 0x0001 /* collision occurred */
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
void selrecord __P((struct proc *selector, struct selinfo *));
diff --git a/sys/sys/sem.h b/sys/sys/sem.h
index 798f5bb7d124..4f31ba1d23eb 100644
--- a/sys/sys/sem.h
+++ b/sys/sys/sem.h
@@ -70,7 +70,7 @@ union semun {
#define SEM_A 0200 /* alter permission */
#define SEM_R 0400 /* read permission */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Kernel implementation stuff
*/
@@ -171,9 +171,9 @@ typedef enum {
SEM_CONFIG_FREEZE, /* Freeze the semaphore facility. */
SEM_CONFIG_THAW /* Thaw the semaphore facility. */
} semconfig_ctl_t;
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@@ -182,6 +182,6 @@ int semctl __P((int, int, int, ...));
int semget __P((key_t, int, int));
int semop __P((int, struct sembuf *,unsigned));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SEM_H_ */
diff --git a/sys/sys/shm.h b/sys/sys/shm.h
index a792f561b116..444539e4f5a1 100644
--- a/sys/sys/shm.h
+++ b/sys/sys/shm.h
@@ -63,7 +63,7 @@ struct shmid_ds {
void *shm_internal; /* sysv stupidity */
};
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* System 5 style catch-all structure for shared memory constants that
@@ -83,7 +83,7 @@ struct proc;
void shmexit __P((struct proc *));
void shmfork __P((struct proc *, struct proc *));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -95,6 +95,6 @@ int shmctl __P((int, int, struct shmid_ds *));
int shmdt __P((void *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_SHM_H_ */
diff --git a/sys/sys/signal.h b/sys/sys/signal.h
index c137ec35db77..2e405a2d03cc 100644
--- a/sys/sys/signal.h
+++ b/sys/sys/signal.h
@@ -124,7 +124,7 @@ typedef void __sighandler_t __P((int));
#define SIG_IGN ((__sighandler_t *)1)
#define SIG_ERR ((__sighandler_t *)-1)
-#if defined(_P1003_1B_VISIBLE) || defined(KERNEL)
+#if defined(_P1003_1B_VISIBLE) || defined(_KERNEL)
union sigval {
/* Members as suggested by Annex C of POSIX 1003.1b. */
int sigval_int;
diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h
index b0c7060e6359..ae825746c470 100644
--- a/sys/sys/signalvar.h
+++ b/sys/sys/signalvar.h
@@ -188,7 +188,7 @@ __sigseteq(sigset_t *set1, sigset_t *set2)
return (1);
}
-#ifdef KERNEL
+#ifdef _KERNEL
struct pgrp;
struct proc;
@@ -239,6 +239,6 @@ extern __inline int __cursig(struct proc *p)
? 0 : issignal(p));
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SIGNALVAR_H_ */
diff --git a/sys/sys/smp.h b/sys/sys/smp.h
index 02f2bb85b62e..8f0a2f8a4572 100644
--- a/sys/sys/smp.h
+++ b/sys/sys/smp.h
@@ -13,7 +13,7 @@
#ifndef _MACHINE_SMP_H_
#define _MACHINE_SMP_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#if defined(SMP) && !defined(APIC_IO)
# error APIC_IO required for SMP, add "options APIC_IO" to your config file.
@@ -182,5 +182,5 @@ extern volatile int smp_idle_loops;
#endif /* !LOCORE */
#endif /* SMP || APIC_IO */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _MACHINE_SMP_H_ */
diff --git a/sys/sys/snoop.h b/sys/sys/snoop.h
index 902df4a1990d..c252cb90e312 100644
--- a/sys/sys/snoop.h
+++ b/sys/sys/snoop.h
@@ -11,17 +11,19 @@
* This software is provided ``AS IS'' without any warranties of any kind.
*
* Snoop stuff.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_SNOOP_H_
#define _SYS_SNOOP_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#define SNOOP_MINLEN (4*1024) /* This should be power of 2.
* 4K tested to be the minimum
* for which on normal tty
@@ -58,7 +60,7 @@ struct snoop {
int snpdown __P((struct snoop *snp));
int snpin __P((struct snoop *snp, char *buf, int n));
int snpinc __P((struct snoop *snp, char c));
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Theese are snoop io controls
diff --git a/sys/sys/socket.h b/sys/sys/socket.h
index 7111dc62abef..5eed6952f3f1 100644
--- a/sys/sys/socket.h
+++ b/sys/sys/socket.h
@@ -414,7 +414,7 @@ struct sf_hdtr {
int trl_cnt; /* number of trailer iovec's */
};
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -442,6 +442,6 @@ int socketpair __P((int, int, int, int *));
void pfctlinput __P((int, struct sockaddr *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_SOCKET_H_ */
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index f7ff74c6e7fd..aedd69043be1 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -243,7 +243,7 @@ struct xsocket {
sowakeup((so), &(so)->so_snd); \
} while (0)
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Argument structure for sosetopt et seq. This is in the KERNEL
@@ -376,6 +376,6 @@ int soshutdown __P((struct socket *so, int how));
void sotoxsocket __P((struct socket *so, struct xsocket *xso));
void sowakeup __P((struct socket *so, struct sockbuf *sb));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SOCKETVAR_H_ */
diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h
index f6f577a1cd1f..e608b3445137 100644
--- a/sys/sys/soundcard.h
+++ b/sys/sys/soundcard.h
@@ -1087,7 +1087,7 @@ typedef struct copr_msg {
*/
#define LOCL_STARTAUDIO 1
-#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
+#if (!defined(_KERNEL) && !defined(INKERNEL)) || defined(USE_SEQ_MACROS)
/*
* Some convenience macros to simplify programming of the
* /dev/sequencer interface
diff --git a/sys/sys/stat.h b/sys/sys/stat.h
index 14a7a50324f6..21cfbc4a023e 100644
--- a/sys/sys/stat.h
+++ b/sys/sys/stat.h
@@ -42,7 +42,7 @@
#ifndef _SYS_STAT_H_
#define _SYS_STAT_H_
-#if !defined(KERNEL) && !defined(_POSIX_SOURCE)
+#if !defined(_KERNEL) && !defined(_POSIX_SOURCE)
/*
* XXX we need this for struct timespec. We get miscellaneous namespace
* pollution with it.
@@ -50,7 +50,7 @@
#include <sys/time.h>
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#define __dev_t udev_t
#else
#define __dev_t dev_t
@@ -223,7 +223,7 @@ struct nstat {
#define SF_APPEND 0x00040000 /* writes to file may only append */
#define SF_NOUNLINK 0x00100000 /* file may not be removed or renamed */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Shorthand abbreviations of above.
*/
@@ -235,7 +235,7 @@ struct nstat {
#endif /* !_POSIX_SOURCE */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@@ -255,6 +255,6 @@ int lstat __P((const char *, struct stat *));
#endif
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_STAT_H_ */
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index c1ef6c87bdff..d5697a6edb10 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -91,7 +91,7 @@ struct ctlname {
*/
#define OID_AUTO (-1)
-#ifdef KERNEL
+#ifdef _KERNEL
#define SYSCTL_HANDLER_ARGS (struct sysctl_oid *oidp, void *arg1, int arg2, \
struct sysctl_req *req)
@@ -193,7 +193,7 @@ void sysctl_unregister_oid(struct sysctl_oid *oidp);
#define SYSCTL_PROC(parent, nbr, name, access, ptr, arg, handler, fmt, descr) \
SYSCTL_OID(parent, nbr, name, access, \
ptr, arg, handler, fmt, descr)
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Top-level identifiers
@@ -468,7 +468,7 @@ void sysctl_unregister_oid(struct sysctl_oid *oidp);
{ "timer_max", CTLTYPE_INT }, \
}
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Declare some common oids.
@@ -502,13 +502,13 @@ int userland_sysctl(struct proc *p, int *name, u_int namelen, void *old,
int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid,
int *nindx, struct sysctl_req *req);
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
__BEGIN_DECLS
int sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
int sysctlbyname __P((const char *, void *, size_t *, void *, size_t));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SYSCTL_H_ */
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index 87a5660383fb..66fe731ae66c 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -77,7 +77,7 @@ struct sysentvec {
/* function to dump core, or NULL */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct sysentvec aout_sysvec;
extern struct sysent sysent[];
@@ -110,6 +110,6 @@ int syscall_register __P((int *offset, struct sysent *new_sysent,
int syscall_deregister __P((int *offset, struct sysent *old_sysent));
int syscall_module_handler __P((struct module *mod, int what, void *arg));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SYSENT_H_ */
diff --git a/sys/sys/syslog.h b/sys/sys/syslog.h
index 8359101a59e8..21c16af99874 100644
--- a/sys/sys/syslog.h
+++ b/sys/sys/syslog.h
@@ -152,7 +152,7 @@ CODE facilitynames[] = {
};
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */
#endif
@@ -175,9 +175,9 @@ CODE facilitynames[] = {
#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
#define LOG_PERROR 0x20 /* log to stderr as well */
-#ifdef KERNEL
+#ifdef _KERNEL
-#else /* not KERNEL */
+#else /* not _KERNEL */
/*
* Don't use va_list in the vsyslog() prototype. Va_list is typedef'd in two
@@ -197,6 +197,6 @@ void syslog __P((int, const char *, ...)) __printflike(2, 3);
void vsyslog __P((int, const char *, _BSD_VA_LIST_)) __printflike(2, 0);
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif
diff --git a/sys/sys/tablet.h b/sys/sys/tablet.h
index 5caa181af9f1..bdf038a99732 100644
--- a/sys/sys/tablet.h
+++ b/sys/sys/tablet.h
@@ -41,7 +41,7 @@
* Tablet line discipline.
*/
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/termios.h b/sys/sys/termios.h
index 72f4b9e060cf..933a05948035 100644
--- a/sys/sys/termios.h
+++ b/sys/sys/termios.h
@@ -230,7 +230,7 @@ struct termios {
#define EXTB 38400
#endif /* !_POSIX_SOURCE */
-#ifndef KERNEL
+#ifndef _KERNEL
#define TCIFLUSH 1
#define TCOFLUSH 2
@@ -260,7 +260,7 @@ int cfsetspeed __P((struct termios *, speed_t));
#endif /* !_POSIX_SOURCE */
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#ifndef _POSIX_SOURCE
diff --git a/sys/sys/time.h b/sys/sys/time.h
index fea32d29e407..d7bbc839e0af 100644
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -159,7 +159,7 @@ struct timecounter {
struct timecounter *tc_tweak;
};
-#ifdef KERNEL
+#ifdef _KERNEL
/* Operations on timespecs */
#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
@@ -198,9 +198,9 @@ struct timecounter {
/* timevaladd and timevalsub are not inlined */
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifndef KERNEL /* NetBSD/OpenBSD compatable interfaces */
+#ifndef _KERNEL /* NetBSD/OpenBSD compatable interfaces */
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
@@ -265,7 +265,7 @@ struct clockinfo {
#define TIMER_ABSTIME 0x1 /* absolute timer */
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct timecounter *timecounter;
extern time_t time_second;
@@ -285,7 +285,7 @@ void timevaladd __P((struct timeval *, struct timeval *));
void timevalsub __P((struct timeval *, struct timeval *));
int tvtohz __P((struct timeval *));
void update_timecounter __P((struct timecounter *tc));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <time.h>
#include <sys/cdefs.h>
@@ -301,6 +301,6 @@ int settimeofday __P((const struct timeval *, const struct timezone *));
int utimes __P((const char *, const struct timeval *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_TIME_H_ */
diff --git a/sys/sys/timepps.h b/sys/sys/timepps.h
index 6d2693c79d3d..3c6d39f4277b 100644
--- a/sys/sys/timepps.h
+++ b/sys/sys/timepps.h
@@ -102,7 +102,7 @@ struct pps_kcbind_args {
#define PPS_IOC_FETCH _IOWR('1', 6, struct pps_fetch_args)
#define PPS_IOC_KCBIND _IOW('1', 7, struct pps_kcbind_args)
-#ifdef KERNEL
+#ifdef _KERNEL
struct pps_state {
pps_params_t ppsparam;
pps_info_t ppsinfo;
@@ -117,7 +117,7 @@ void pps_init __P((struct pps_state *pps));
int pps_ioctl __P((u_long cmd, caddr_t data, struct pps_state *pps));
void hardpps __P((struct timespec *tsp, long nsec));
-#else /* !KERNEL */
+#else /* !_KERNEL */
static __inline int
time_pps_create(int filedes, pps_handle_t *handle)
@@ -186,5 +186,5 @@ time_pps_kcbind(pps_handle_t handle, const int kernel_consumer,
return (ioctl(handle, PPS_IOC_KCBIND, &arg));
}
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* _SYS_TIMEPPS_H_ */
diff --git a/sys/sys/times.h b/sys/sys/times.h
index ba6dee0ed709..668ac7a338ac 100644
--- a/sys/sys/times.h
+++ b/sys/sys/times.h
@@ -56,7 +56,7 @@ struct tms {
clock_t tms_cstime; /* System CPU time of terminated child procs */
};
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h
index fea32d29e407..d7bbc839e0af 100644
--- a/sys/sys/timetc.h
+++ b/sys/sys/timetc.h
@@ -159,7 +159,7 @@ struct timecounter {
struct timecounter *tc_tweak;
};
-#ifdef KERNEL
+#ifdef _KERNEL
/* Operations on timespecs */
#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
@@ -198,9 +198,9 @@ struct timecounter {
/* timevaladd and timevalsub are not inlined */
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifndef KERNEL /* NetBSD/OpenBSD compatable interfaces */
+#ifndef _KERNEL /* NetBSD/OpenBSD compatable interfaces */
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
@@ -265,7 +265,7 @@ struct clockinfo {
#define TIMER_ABSTIME 0x1 /* absolute timer */
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct timecounter *timecounter;
extern time_t time_second;
@@ -285,7 +285,7 @@ void timevaladd __P((struct timeval *, struct timeval *));
void timevalsub __P((struct timeval *, struct timeval *));
int tvtohz __P((struct timeval *));
void update_timecounter __P((struct timecounter *tc));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <time.h>
#include <sys/cdefs.h>
@@ -301,6 +301,6 @@ int settimeofday __P((const struct timeval *, const struct timezone *));
int utimes __P((const char *, const struct timeval *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_TIME_H_ */
diff --git a/sys/sys/timex.h b/sys/sys/timex.h
index 747d7f4d1023..9de19957b7b2 100644
--- a/sys/sys/timex.h
+++ b/sys/sys/timex.h
@@ -39,6 +39,8 @@
*
* 17 Sep 93 David L. Mills
* Created file
+ *
+ * $FreeBSD$
*/
/*
* This header file defines the Network Time Protocol (NTP) interfaces
@@ -211,17 +213,17 @@ struct timex {
#ifdef __FreeBSD__
-#ifdef KERNEL
+#ifdef _KERNEL
struct timecounter;
void ntp_update_second __P((struct timecounter *tc));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
__BEGIN_DECLS
int ntp_adjtime __P((struct timex *));
int ntp_gettime __P((struct ntptimeval *));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* __FreeBSD__ */
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index f51fe66c443d..46b11ea4edc0 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -130,7 +130,7 @@ struct tty {
#define TTYHOG 1024
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#define TTMAXHIWAT roundup(2048, CBSIZE)
#define TTMINHIWAT roundup(100, CBSIZE)
#define TTMAXLOWAT 256
@@ -220,7 +220,7 @@ struct speedtab {
#define TSA_PTC_WRITE(tp) ((void *)&(tp)->t_rawq.c_cl)
#define TSA_PTS_READ(tp) ((void *)&(tp)->t_canq)
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_TTYS);
#endif
@@ -271,6 +271,6 @@ int ttywait __P((struct tty *tp));
int ttywrite __P((dev_t dev, struct uio *uio, int flag));
int unputc __P((struct clist *q));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_TTY_H_ */
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 69b00cb706fa..34a115409de0 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -89,20 +89,20 @@ typedef int32_t swblk_t; /* swap offset */
typedef int32_t ufs_daddr_t;
typedef u_int32_t uid_t; /* user id */
-#ifdef KERNEL
+#ifdef _KERNEL
typedef int boolean_t;
typedef u_int64_t uoff_t;
typedef struct vm_page *vm_page_t;
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
struct specinfo;
typedef u_int32_t udev_t; /* device number */
typedef struct specinfo *dev_t;
-#else /* !KERNEL */
+#else /* !_KERNEL */
typedef u_int32_t dev_t; /* device number */
#define udev_t dev_t
@@ -120,7 +120,7 @@ typedef u_int32_t dev_t; /* device number */
#endif /* _POSIX_SOURCE */
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#include <machine/endian.h>
@@ -189,7 +189,7 @@ typedef struct fd_set {
* <stdio.h> to give broken programs a better chance of working with
* 64-bit off_t's.
*/
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
#ifndef _FTRUNCATE_DECLARED
#define _FTRUNCATE_DECLARED
@@ -208,7 +208,7 @@ void * mmap __P((void *, size_t, int, int, int, off_t));
int truncate __P((const char *, off_t));
#endif
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_POSIX_SOURCE */
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 6009f93a675d..256119ce2757 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -53,7 +53,7 @@ struct ucred {
#define NOCRED ((struct ucred *)0) /* no credential available */
#define FSCRED ((struct ucred *)-1) /* filesystem credential */
-#ifdef KERNEL
+#ifdef _KERNEL
#define crhold(cr) (cr)->cr_ref++
struct ucred *crcopy __P((struct ucred *cr));
@@ -61,6 +61,6 @@ struct ucred *crdup __P((struct ucred *cr));
void crfree __P((struct ucred *cr));
struct ucred *crget __P((void));
int groupmember __P((gid_t gid, struct ucred *cred));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_UCRED_H_ */
diff --git a/sys/sys/uio.h b/sys/sys/uio.h
index e55b84055563..a2de90ac235b 100644
--- a/sys/sys/uio.h
+++ b/sys/sys/uio.h
@@ -56,7 +56,7 @@ enum uio_seg {
UIO_NOCOPY /* don't copy, already in object */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct uio {
struct iovec *uio_iov;
@@ -80,7 +80,7 @@ int uiomove __P((caddr_t, int, struct uio *));
int uiomoveco __P((caddr_t, int, struct uio *, struct vm_object *));
int uioread __P((int, struct uio *, struct vm_object *, int *));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -89,6 +89,6 @@ ssize_t readv __P((int, const struct iovec *, int));
ssize_t writev __P((int, const struct iovec *, int));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_UIO_H_ */
diff --git a/sys/sys/un.h b/sys/sys/un.h
index a99ba68d9a14..e7c370195a50 100644
--- a/sys/sys/un.h
+++ b/sys/sys/un.h
@@ -46,7 +46,7 @@ struct sockaddr_un {
char sun_path[104]; /* path name (gag) */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct mbuf;
struct socket;
@@ -57,12 +57,12 @@ void unp_dispose __P((struct mbuf *m));
int unp_externalize __P((struct mbuf *rights));
void unp_init __P((void));
extern struct pr_usrreqs uipc_usrreqs;
-#else /* !KERNEL */
+#else /* !_KERNEL */
/* actual length of an initialized sockaddr_un */
#define SUN_LEN(su) \
(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_UN_H_ */
diff --git a/sys/sys/user.h b/sys/sys/user.h
index 9a4b9ecc9a41..da2fbbe5bb30 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -38,7 +38,7 @@
#define _SYS_USER_H_
#include <machine/pcb.h>
-#ifndef KERNEL
+#ifndef _KERNEL
/* stuff that *used* to be included by user.h, or is now needed */
#include <sys/errno.h>
#include <sys/time.h>
@@ -51,7 +51,7 @@
#include <vm/pmap.h> /* XXX */
#include <sys/lock.h> /* XXX */
#include <vm/vm_map.h> /* XXX */
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#ifndef _SYS_RESOURCEVAR_H_
#include <sys/resourcevar.h>
#endif
@@ -130,13 +130,13 @@ struct user {
#define U_sig u_kproc.kp_proc.p_sig
#define U_code u_kproc.kp_proc.p_code
-#ifndef KERNEL
+#ifndef _KERNEL
#define u_ar0 U_ar0
#define u_tsize U_tsize
#define u_dsize U_dsize
#define u_ssize U_ssize
#define u_sig U_sig
#define u_code U_code
-#endif /* KERNEL */
+#endif
#endif
diff --git a/sys/sys/utsname.h b/sys/sys/utsname.h
index 375c3d403f36..f26b9f1e7020 100644
--- a/sys/sys/utsname.h
+++ b/sys/sys/utsname.h
@@ -54,7 +54,7 @@ struct utsname {
#include <sys/cdefs.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#ifdef __STDC__
__BEGIN_DECLS
int uname __P((struct utsname *));
@@ -64,6 +64,6 @@ extern int uname();
#endif
#else
extern struct utsname utsname;
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_UTSNAME_H */
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h
index 2ae45a378cdc..0ca843226154 100644
--- a/sys/sys/vmmeter.h
+++ b/sys/sys/vmmeter.h
@@ -93,7 +93,7 @@ struct vmmeter {
u_int v_interrupt_free_min; /* reserved number of pages for int code */
u_int v_free_severe; /* severe depletion of pages below this pt */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct vmmeter cnt;
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index afb6bfce377e..e37035a82084 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -226,7 +226,7 @@ struct vattr {
*/
#define VNOVAL (-1)
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_VNODE);
@@ -300,7 +300,7 @@ extern void (*lease_updatetime) __P((int deltat));
(((vp)->v_flag & (VFREE|VTBFREE)) && \
((vp)->v_holdcnt || (vp)->v_usecount))
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
@@ -352,7 +352,7 @@ struct vnodeop_desc {
caddr_t *vdesc_transports;
};
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* A list of all the operation descs.
*/
@@ -621,6 +621,6 @@ extern vop_t **spec_vnodeop_p;
extern TAILQ_HEAD(tobefreelist, vnode)
vnode_tobefree_list; /* vnode free list */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_VNODE_H_ */
diff --git a/sys/sys/wait.h b/sys/sys/wait.h
index c854e149d3c6..036dda852eeb 100644
--- a/sys/sys/wait.h
+++ b/sys/sys/wait.h
@@ -144,7 +144,7 @@ union wait {
#define WSTOPPED _WSTOPPED
#endif /* _POSIX_SOURCE */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#include <sys/cdefs.h>