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.
This commit is contained in:
parent
a0b57fb738
commit
664a31e496
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55205
@ -53,9 +53,9 @@
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/vm_map.h>
|
||||
#define KERNEL /* Avoid userland compatability headers */
|
||||
#define _KERNEL /* Avoid userland compatability headers */
|
||||
#include <sys/user.h>
|
||||
#undef KERNEL
|
||||
#undef _KERNEL
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <nfs/nfsv2.h>
|
||||
|
@ -1159,7 +1159,7 @@ ieee_convert_S_Q(fp_register_t f, int rnd,
|
||||
return ieee_convert_T_Q(f, rnd, control, status);
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
@ -617,7 +617,7 @@ label: ASCIZ msg; \
|
||||
* Kernel RCS ID tag and copyright macros
|
||||
*/
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#ifdef __ELF__
|
||||
#define __KERNEL_SECTIONSTRING(_sec, _str) \
|
||||
@ -635,4 +635,4 @@ label: ASCIZ msg; \
|
||||
#define __KERNEL_RCSID(_n, _s) /* nothing */
|
||||
#endif
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef _MACHINE_CLOCK_H_
|
||||
#define _MACHINE_CLOCK_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
extern int disable_rtc_set;
|
||||
extern int wall_cmos_clock;
|
||||
@ -20,6 +20,6 @@ int sysbeep __P((int pitch, int period));
|
||||
int acquire_timer2 __P((int mode));
|
||||
int release_timer2 __P((void));
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* !_MACHINE_CLOCK_H_ */
|
||||
|
@ -90,7 +90,7 @@ struct clockframe {
|
||||
|
||||
#define aston() (astpending = 1)
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
u_int32_t astpending; /* need to trap before returning to user mode */
|
||||
u_int32_t intr_nesting_level; /* bookeeping only; counts software intr */
|
||||
u_int32_t want_resched; /* resched() was called */
|
||||
@ -124,7 +124,7 @@ u_int32_t want_resched; /* resched() was called */
|
||||
{ "wall_cmos_clock", CTLTYPE_INT }, \
|
||||
}
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
struct pcb;
|
||||
struct proc;
|
||||
@ -176,6 +176,6 @@ void syscall __P((u_int64_t, struct trapframe *));
|
||||
void trap __P((unsigned long, unsigned long, unsigned long, unsigned long,
|
||||
struct trapframe *));
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _ALPHA_CPU_H_ */
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* $FreeBSD$ */
|
||||
/* $NetBSD: cpuconf.h,v 1.7 1997/11/06 00:42:03 thorpej Exp $ */
|
||||
#ifndef _ALPHA_CPUCONF_H
|
||||
#define _ALPHA_CPUCONF_H
|
||||
@ -34,7 +35,7 @@
|
||||
* Additional reworking by Matthew Jacob for NASA/Ames Research Center.
|
||||
* Copyright (c) 1997
|
||||
*/
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* Platform Specific Information and Function Hooks.
|
||||
*
|
||||
@ -119,5 +120,5 @@ extern int ncpuinit;
|
||||
extern void platform_not_configured __P((int));
|
||||
extern void platform_not_supported __P((int));
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_ALPHA_CPUCONF_H */
|
||||
|
@ -29,7 +29,7 @@
|
||||
#ifndef _MACHINE_CPUFUNC_H_
|
||||
#define _MACHINE_CPUFUNC_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <machine/chipset.h>
|
||||
@ -100,6 +100,6 @@ extern void memsetw(void *, int, size_t);
|
||||
extern void memsetw_io(u_int32_t, int, size_t);
|
||||
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_CPUFUNC_H_ */
|
||||
|
@ -135,7 +135,7 @@ __ElfType(Auxinfo);
|
||||
#define ELF_TARG_MACH EM_ALPHA
|
||||
#define ELF_TARG_VER 1
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* On the Alpha we load the dynamic linker where a userland call
|
||||
@ -146,5 +146,5 @@ __ElfType(Auxinfo);
|
||||
#define ELF_RTLD_ADDR(vmspace) \
|
||||
(round_page((vm_offset_t)(vmspace)->vm_daddr + MAXDSIZ))
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
#endif /* !_MACHINE_ELF_H_ */
|
||||
|
@ -115,7 +115,7 @@
|
||||
__asm__("mt_fpcr %0" : : "f" (x)); \
|
||||
__asm__("trapb")
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
extern int fp_software_completion(u_int64_t regmask, struct proc *p);
|
||||
|
||||
|
@ -69,10 +69,10 @@ in_cksum_update(struct ip *ip)
|
||||
#endif
|
||||
|
||||
typedef unsigned in_psum_t;
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
u_int in_cksum_hdr(const struct ip *ip);
|
||||
in_psum_t in_cksum_partial(in_psum_t psum, const u_short *w, int len);
|
||||
int in_cksum_finalize(in_psum_t psum);
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* _MACHINE_IN_CKSUM_H_ */
|
||||
|
@ -72,7 +72,7 @@
|
||||
# define INTRCNT_KN300_I2C_CTRL INTRCNT_KN300_IRQ + 17
|
||||
# define INTRCNT_KN300_I2C_BUS INTRCNT_KN300_IRQ + 18
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#ifndef _LOCORE
|
||||
extern volatile long intrcnt[];
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifndef _MACHINE_IOCTL_FD_H_
|
||||
#define _MACHINE_IOCTL_FD_H_
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
@ -112,7 +112,7 @@ struct vesa_mode
|
||||
u_int8_t v_offscreensize;
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define VESA_MODE(x) ((x) >= M_VESA_BASE)
|
||||
|
||||
@ -123,6 +123,6 @@ int vesa_unload_ioctl(void);
|
||||
int vesa_load(void);
|
||||
#endif
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_PC_VESA_H */
|
||||
|
@ -107,14 +107,14 @@ typedef alpha_pt_entry_t pt_entry_t;
|
||||
/*
|
||||
* Address of current address space page table maps
|
||||
*/
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern pt_entry_t PTmap[]; /* lev3 page tables */
|
||||
extern pt_entry_t PTlev2[]; /* lev2 page tables */
|
||||
extern pt_entry_t PTlev1[]; /* lev1 page table */
|
||||
extern pt_entry_t PTlev1pte; /* pte that maps lev1 page table */
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* virtual address to page table entry and
|
||||
* to physical address.
|
||||
@ -152,7 +152,7 @@ alpha_XXX_dmamap(vm_offset_t va)
|
||||
return (pmap_kextract(va) | alpha_XXX_dmamap_or);
|
||||
}
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* Pmap stuff
|
||||
@ -188,7 +188,7 @@ struct pmap {
|
||||
|
||||
typedef struct pmap *pmap_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern pmap_t kernel_pmap;
|
||||
#endif
|
||||
|
||||
@ -209,7 +209,7 @@ typedef struct pv_entry {
|
||||
#define PV_CI 0x01 /* all entries must be cache inhibited */
|
||||
#define PV_PTPAGE 0x02 /* entry maps a page table page */
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
extern caddr_t CADDR1;
|
||||
extern pt_entry_t *CMAP1;
|
||||
@ -235,7 +235,7 @@ void pmap_set_opt_bsp __P((void));
|
||||
void pmap_deactivate __P((struct proc *p));
|
||||
void pmap_emulate_reference __P((struct proc *p, vm_offset_t v, int user, int write));
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !LOCORE */
|
||||
|
||||
|
@ -207,7 +207,7 @@ LX98: ldgp $29,0($27); \
|
||||
\
|
||||
.end _mcount");
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* The following two macros do splhigh and splx respectively.
|
||||
* _alpha_pal_swpipl is a special version of alpha_pal_swpipl which
|
||||
@ -232,6 +232,6 @@ void stopguprof __P((struct gmonparam *p));
|
||||
#define stopguprof(p)
|
||||
#endif /* GUPROF */
|
||||
|
||||
#else /* !KERNEL */
|
||||
#else /* !_KERNEL */
|
||||
typedef u_long uintfptr_t;
|
||||
#endif
|
||||
|
@ -94,7 +94,7 @@ int prom_getenv __P((int, char *, int));
|
||||
prom_dispatch(PROM_R_GETENV, id, (u_int64_t)buf, len, 0)
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
void promcnputc __P((dev_t, int));
|
||||
int promcngetc __P((dev_t));
|
||||
int promcncheckc __P((dev_t));
|
||||
@ -102,5 +102,5 @@ int promcncheckc __P((dev_t));
|
||||
u_int64_t prom_dispatch __P((u_int64_t, u_int64_t, u_int64_t, u_int64_t,
|
||||
u_int64_t));
|
||||
void init_bootstrap_console __P((void));
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* ASSEMBLER */
|
||||
|
@ -47,10 +47,10 @@
|
||||
|
||||
#define FIX_SSTEP(p) ptrace_clear_single_step(p)
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
int ptrace_clear_single_step __P((struct proc *p));
|
||||
int ptrace_read_u_check __P((struct proc *p, vm_offset_t off, size_t len));
|
||||
#endif /* !KERNEL */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -107,7 +107,7 @@ struct dbreg {
|
||||
unsigned long wankage;
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
void restorefpstate __P((struct fpreg *));
|
||||
void savefpstate __P((struct fpreg *));
|
||||
void setregs __P((struct proc *, u_long, u_long, u_long));
|
||||
|
@ -43,7 +43,7 @@
|
||||
#define ALPHA_GET_FPMASK 1
|
||||
#define ALPHA_SET_FPMASK 2
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
union descriptor;
|
||||
@ -51,6 +51,6 @@ union descriptor;
|
||||
__BEGIN_DECLS
|
||||
int alpha_sethae __P((u_int64_t));
|
||||
__END_DECLS
|
||||
#endif /* !KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* !_MACHINE_SYSARCH_H_ */
|
||||
|
@ -59,7 +59,7 @@ typedef unsigned long vm_size_t;
|
||||
|
||||
typedef __int64_t register_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
typedef long intfptr_t;
|
||||
typedef unsigned long uintfptr_t;
|
||||
#endif
|
||||
|
@ -56,9 +56,9 @@
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/vm_map.h>
|
||||
#define KERNEL /* Avoid userland compatability headers */
|
||||
#define _KERNEL /* Avoid userland compatability headers */
|
||||
#include <sys/user.h>
|
||||
#undef KERNEL
|
||||
#undef _KERNEL
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <nfs/nfsv2.h>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef _MACHINE_CLOCK_H_
|
||||
#define _MACHINE_CLOCK_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* i386 to clock driver interface.
|
||||
* XXX large parts of the driver and its interface are misplaced.
|
||||
@ -46,6 +46,6 @@ int release_timer1 __P((void));
|
||||
int sysbeep __P((int pitch, int period));
|
||||
void i8254_restore __P((void));
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_CLOCK_H_ */
|
||||
|
@ -124,7 +124,7 @@
|
||||
{ "wall_cmos_clock", CTLTYPE_INT }, \
|
||||
}
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern int astpending;
|
||||
extern char btext[];
|
||||
extern char etext[];
|
||||
|
@ -240,7 +240,7 @@ invd(void)
|
||||
__asm __volatile("invd");
|
||||
}
|
||||
|
||||
#if defined(SMP) && defined(KERNEL)
|
||||
#if defined(SMP) && defined(_KERNEL)
|
||||
|
||||
/*
|
||||
* When using APIC IPI's, invlpg() is not simply the invlpg instruction
|
||||
@ -271,7 +271,7 @@ cpu_invltlb(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#else /* !(SMP && KERNEL) */
|
||||
#else /* !(SMP && _KERNEL) */
|
||||
|
||||
static __inline void
|
||||
invlpg(u_int addr)
|
||||
@ -294,7 +294,7 @@ invltlb(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* SMP && KERNEL */
|
||||
#endif /* SMP && _KERNEL */
|
||||
|
||||
static __inline u_short
|
||||
inw(u_int port)
|
||||
|
@ -118,7 +118,7 @@ __ElfType(Auxinfo);
|
||||
#define ELF_TARG_MACH EM_386
|
||||
#define ELF_TARG_VER 1
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* On the i386 we load the dynamic linker where a userland call
|
||||
@ -129,5 +129,5 @@ __ElfType(Auxinfo);
|
||||
#define ELF_RTLD_ADDR(vmspace) \
|
||||
(round_page((vm_offset_t)(vmspace)->vm_daddr + MAXDSIZ))
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_MACHINE_ELF_H_ */
|
||||
|
@ -136,7 +136,7 @@ struct save87 {
|
||||
#define __INITIAL_NPXCW__ __BDE_NPXCW__
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#ifndef npxproc
|
||||
extern struct proc *npxproc;
|
||||
#endif
|
||||
|
@ -136,7 +136,7 @@ struct save87 {
|
||||
#define __INITIAL_NPXCW__ __BDE_NPXCW__
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#ifndef npxproc
|
||||
extern struct proc *npxproc;
|
||||
#endif
|
||||
|
@ -89,7 +89,7 @@ struct pcb {
|
||||
struct md_coredump {
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#ifndef curpcb
|
||||
extern struct pcb *curpcb; /* our current running pcb */
|
||||
|
@ -51,7 +51,7 @@ struct pcb_ldt {
|
||||
struct segment_descriptor ldt_sd;
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#ifdef USER_LDT
|
||||
void set_user_ldt __P((struct pcb *));
|
||||
|
@ -137,14 +137,14 @@ typedef unsigned int *pt_entry_t;
|
||||
* Address of current and alternate address space page table maps
|
||||
* and directories.
|
||||
*/
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern pt_entry_t PTmap[], APTmap[], Upte;
|
||||
extern pd_entry_t PTD[], APTD[], PTDpde, APTDpde, Upde;
|
||||
|
||||
extern pd_entry_t IdlePTD; /* physical address of "Idle" state directory */
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* virtual address to page table entry and
|
||||
* to physical address. Likewise for alternate address space.
|
||||
@ -208,7 +208,7 @@ struct pmap {
|
||||
|
||||
typedef struct pmap *pmap_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern pmap_t kernel_pmap;
|
||||
#endif
|
||||
|
||||
@ -229,7 +229,7 @@ typedef struct pv_entry {
|
||||
#define PV_CI 0x01 /* all entries must be cache inhibited */
|
||||
#define PV_PTPAGE 0x02 /* entry maps a page table page */
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define NPPROVMTRR 8
|
||||
#define PPRO_VMTRRphysBase0 0x200
|
||||
@ -260,7 +260,7 @@ vm_page_t pmap_use_pt __P((pmap_t, vm_offset_t));
|
||||
void pmap_set_opt __P((void));
|
||||
#endif
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !LOCORE */
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#ifndef _MACHINE_PROFILE_H_
|
||||
#define _MACHINE_PROFILE_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* Config generates something to tell the compiler to align functions on 16
|
||||
@ -74,7 +74,7 @@
|
||||
#endif
|
||||
#endif /* GUPROF */
|
||||
|
||||
#else /* !KERNEL */
|
||||
#else /* !_KERNEL */
|
||||
|
||||
#define FUNCTION_ALIGNMENT 4
|
||||
|
||||
@ -105,7 +105,7 @@ mcount() \
|
||||
|
||||
typedef unsigned int uintfptr_t;
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* An unsigned integral type that can hold non-negative difference between
|
||||
@ -113,7 +113,7 @@ typedef unsigned int uintfptr_t;
|
||||
*/
|
||||
typedef u_int fptrdiff_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
void mcount __P((uintfptr_t frompc, uintfptr_t selfpc));
|
||||
|
||||
@ -129,7 +129,7 @@ void stopguprof __P((struct gmonparam *p));
|
||||
#define stopguprof(p)
|
||||
#endif /* GUPROF */
|
||||
|
||||
#else /* !KERNEL */
|
||||
#else /* !_KERNEL */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
@ -144,7 +144,7 @@ void mcount __P((void)) __asm("mcount");
|
||||
static void _mcount __P((uintfptr_t frompc, uintfptr_t selfpc));
|
||||
__END_DECLS
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef GUPROF
|
||||
/* XXX doesn't quite work outside kernel yet. */
|
||||
|
@ -47,9 +47,9 @@
|
||||
#define PT_GETDBREGS (PT_FIRSTMACH + 5)
|
||||
#define PT_SETDBREGS (PT_FIRSTMACH + 6)
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
int ptrace_read_u_check __P((struct proc *p, vm_offset_t off, size_t len));
|
||||
#endif /* !KERNEL */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -130,7 +130,7 @@ struct dbreg {
|
||||
};
|
||||
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* XXX these interfaces are MI, so they should be declared in a MI place.
|
||||
*/
|
||||
|
@ -242,7 +242,7 @@ struct region_descriptor {
|
||||
#define LBSDICALLS_SEL 16 /* BSDI system call gate */
|
||||
#define NLDT (LBSDICALLS_SEL + 1)
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#ifndef currentldt
|
||||
extern int currentldt;
|
||||
#endif
|
||||
@ -259,6 +259,6 @@ void sdtossd __P((struct segment_descriptor *sdp,
|
||||
struct soft_segment_descriptor *ssdp));
|
||||
void ssdtosd __P((struct soft_segment_descriptor *ssdp,
|
||||
struct segment_descriptor *sdp));
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_SEGMENTS_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_ */
|
||||
|
@ -64,7 +64,7 @@ struct i386_vm86_args {
|
||||
char *sub_args; /* args */
|
||||
};
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
union descriptor;
|
||||
@ -76,6 +76,6 @@ int i386_get_ioperm __P((unsigned int, unsigned int *, int *));
|
||||
int i386_set_ioperm __P((unsigned int, unsigned int, int));
|
||||
int i386_vm86 __P((int, void *));
|
||||
__END_DECLS
|
||||
#endif /* !KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* !_MACHINE_SYSARCH_H_ */
|
||||
|
@ -82,7 +82,7 @@ struct i386tss {
|
||||
/* XXX unimplemented .. i/o permission bitmap */
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#ifndef common_tss
|
||||
extern struct i386tss common_tss;
|
||||
#endif
|
||||
|
@ -40,7 +40,7 @@
|
||||
* Low level interrupt code.
|
||||
*/
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#if defined(SMP) || defined(APIC_IO)
|
||||
/*
|
||||
@ -208,6 +208,6 @@ int inthand_remove(struct intrec *idesc);
|
||||
|
||||
#endif /* LOCORE */
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_I386_ISA_INTR_MACHDEP_H_ */
|
||||
|
@ -37,7 +37,7 @@
|
||||
#ifndef _I386_ISA_ISA_DMA_H_
|
||||
#define _I386_ISA_ISA_DMA_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
void isa_dmacascade __P((int chan));
|
||||
void isa_dmadone __P((int flags, caddr_t addr, int nbytes, int chan));
|
||||
void isa_dmainit __P((int chan, u_int bouncebufsize));
|
||||
@ -46,6 +46,6 @@ int isa_dma_acquire __P((int chan));
|
||||
void isa_dma_release __P((int chan));
|
||||
int isa_dmastatus __P((int chan));
|
||||
int isa_dmastop __P((int chan));
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* !_I386_ISA_ISA_DMA_H_ */
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <opt_scsi.h>
|
||||
|
||||
#include <sys/systm.h>
|
||||
@ -46,7 +46,7 @@
|
||||
#include <cam/cam_xpt.h>
|
||||
#include <cam/cam_xpt_periph.h>
|
||||
#include <cam/scsi/scsi_all.h>
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <camlib.h>
|
||||
|
||||
#ifndef FALSE
|
||||
@ -57,7 +57,7 @@
|
||||
#endif /* TRUE */
|
||||
#define ERESTART -1 /* restart syscall */
|
||||
#define EJUSTRETURN -2 /* don't modify regs, just return */
|
||||
#endif /* !KERNEL */
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
const char *scsi_sense_key_text[] =
|
||||
{
|
||||
@ -715,7 +715,7 @@ scsi_op_desc(u_int16_t opcode, struct scsi_inquiry_data *inq_data)
|
||||
* If we're in the kernel, 'quantum' is already defined in cam_xpt.c.
|
||||
* Otherwise, we need to define it.
|
||||
*/
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern const char quantum[];
|
||||
#else
|
||||
static const char quantum[] = "QUANTUM";
|
||||
@ -1622,7 +1622,7 @@ scsi_cdb_string(u_int8_t *cdb_ptr, char *cdb_string, size_t len)
|
||||
* Because scsi_sense_print() utilizes transport layer functions, it will
|
||||
* only work in the kernel.
|
||||
*/
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
void
|
||||
scsi_sense_print(struct ccb_scsiio *csio)
|
||||
@ -1793,7 +1793,7 @@ scsi_sense_print(struct ccb_scsiio *csio)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#else /* !KERNEL */
|
||||
#else /* !_KERNEL */
|
||||
|
||||
|
||||
char *
|
||||
@ -2102,9 +2102,9 @@ scsi_sense_print(struct cam_device *device, struct ccb_scsiio *csio,
|
||||
fprintf(ofile, "%s", scsi_sense_string(device, csio, str, 2048));
|
||||
}
|
||||
|
||||
#endif /* KERNEL/!KERNEL */
|
||||
#endif /* _KERNEL/!_KERNEL */
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
int
|
||||
scsi_interpret_sense(union ccb *ccb, u_int32_t sense_flags,
|
||||
u_int32_t *relsim_flags, u_int32_t *openings,
|
||||
@ -2128,7 +2128,7 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
|
||||
sense = &csio->sense_data;
|
||||
scsi_extract_sense(sense, &error_code, &sense_key, &asc, &ascq);
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
if (bootverbose) {
|
||||
sense_flags |= SF_PRINT_ALWAYS;
|
||||
print_sense = TRUE;
|
||||
@ -2280,7 +2280,7 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
|
||||
}
|
||||
|
||||
if (print_sense) {
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
scsi_sense_print(csio);
|
||||
#else
|
||||
scsi_sense_print(device, csio, stdout);
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include "opt_scsi.h"
|
||||
/*
|
||||
* This is the number of seconds we wait for devices to settle after a SCSI
|
||||
@ -51,7 +51,7 @@
|
||||
#if (SCSI_DELAY < 100)
|
||||
#error "SCSI_DELAY is in milliseconds, not seconds! Please use a larger value"
|
||||
#endif
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* SCSI command format
|
||||
@ -701,7 +701,7 @@ struct scsi_op_quirk_entry {
|
||||
struct ccb_scsiio;
|
||||
struct cam_periph;
|
||||
union ccb;
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
struct cam_device;
|
||||
#endif
|
||||
|
||||
@ -712,7 +712,7 @@ const char * scsi_sense_desc(int asc, int ascq,
|
||||
struct scsi_inquiry_data *inq_data);
|
||||
scsi_sense_action scsi_error_action(int asc, int ascq,
|
||||
struct scsi_inquiry_data *inq_data);
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
void scsi_sense_print(struct ccb_scsiio *csio);
|
||||
int scsi_interpret_sense(union ccb *ccb,
|
||||
u_int32_t sense_flags,
|
||||
@ -733,7 +733,7 @@ int scsi_interpret_sense(struct cam_device *device,
|
||||
u_int32_t *reduction,
|
||||
u_int32_t *timeout,
|
||||
scsi_sense_action error_action);
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#define SF_RETRY_UA 0x01
|
||||
#define SF_NO_PRINT 0x02
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/queue.h>
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#endif
|
||||
@ -49,7 +49,7 @@
|
||||
#include <sys/devicestat.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
@ -65,7 +65,7 @@
|
||||
#include <cam/scsi/scsi_message.h>
|
||||
#include <cam/scsi/scsi_sa.h>
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <opt_sa.h>
|
||||
|
||||
@ -3210,7 +3210,7 @@ saerase(struct cam_periph *periph, int longerase)
|
||||
return (error);
|
||||
}
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* Read tape block limits command.
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#ifndef _CAM_SCSI_SCSI_TARGETIO_H_
|
||||
#define _CAM_SCSI_SCSI_TARGETIO_H_
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
@ -43,16 +43,14 @@ INCLUDES+= -I$S/../include
|
||||
.else
|
||||
INCLUDES+= -I/usr/include
|
||||
.endif
|
||||
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
|
||||
# KAME mandatory flags
|
||||
COPTS+= -D_KERNEL
|
||||
COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h
|
||||
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
|
||||
|
||||
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
|
||||
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
|
||||
|
||||
# Use the default object format for genassym, etc.
|
||||
GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -UKERNEL
|
||||
GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -U_KERNEL
|
||||
|
||||
# Select the correct set of tools. Can't set OBJFORMAT here because it
|
||||
# doesn't get exported into the environment, and if it were exported
|
||||
|
@ -43,16 +43,14 @@ INCLUDES+= -I$S/../include
|
||||
.else
|
||||
INCLUDES+= -I/usr/include
|
||||
.endif
|
||||
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
|
||||
# KAME mandatory flags
|
||||
COPTS+= -D_KERNEL
|
||||
COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h
|
||||
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
|
||||
|
||||
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
|
||||
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
|
||||
|
||||
# Use the default object format for genassym, etc.
|
||||
GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -UKERNEL
|
||||
GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -U_KERNEL
|
||||
|
||||
# Select the correct set of tools. Can't set OBJFORMAT here because it
|
||||
# doesn't get exported into the environment, and if it were exported
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <sys/systm.h>
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
typedef enum {
|
||||
C46 = 6,
|
||||
@ -92,4 +92,4 @@ struct seeprom_descriptor {
|
||||
int read_seeprom(struct seeprom_descriptor *sd, u_int16_t *buf,
|
||||
bus_size_t start_addr, bus_size_t count);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <sys/systm.h>
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
typedef enum {
|
||||
C46 = 6,
|
||||
@ -92,4 +92,4 @@ struct seeprom_descriptor {
|
||||
int read_seeprom(struct seeprom_descriptor *sd, u_int16_t *buf,
|
||||
bus_size_t start_addr, bus_size_t count);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
@ -133,7 +133,7 @@
|
||||
#define PSM_BALLPOINT_ID 2
|
||||
#define PSM_INTELLI_ID 3
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define ATKBDC_DRIVER_NAME "atkbdc"
|
||||
|
||||
@ -242,6 +242,6 @@ void kbdc_set_device_mask(KBDC kbdc, int mask);
|
||||
int get_controller_command_byte(KBDC kbdc);
|
||||
int set_controller_command_byte(KBDC kbdc, int command, int flag);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_DEV_KBD_ATKBDCREG_H_ */
|
||||
|
@ -36,12 +36,12 @@
|
||||
#define KB_CONF_NO_RESET (1 << 1) /* don't reset the keyboard */
|
||||
#define KB_CONF_ALT_SCANCODESET (1 << 2) /* assume the XT type keyboard */
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
int atkbd_probe_unit(int unit, int port, int irq, int flags);
|
||||
int atkbd_attach_unit(int unit, keyboard_t **kbd,
|
||||
int port, int irq, int flags);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* !_DEV_KBD_ATKBDREG_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>
|
||||
|
@ -1222,7 +1222,7 @@ typedef struct dpt_user_softc {
|
||||
* These all come from dpt_scsi.c
|
||||
*
|
||||
*/
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/* This function gets the current hi-res time and returns it to the caller */
|
||||
static __inline struct timeval
|
||||
dpt_time_now(void)
|
||||
@ -1244,7 +1244,7 @@ dpt_minor2unit(int minor)
|
||||
|
||||
dpt_softc_t *dpt_minor2softc(int minor_no);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* This function substracts one timval structure from another,
|
||||
|
@ -29,7 +29,7 @@
|
||||
#ifndef _DEV_FB_FBREG_H_
|
||||
#define _DEV_FB_FBREG_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define V_MAX_ADAPTERS 8 /* XXX */
|
||||
|
||||
@ -205,6 +205,6 @@ void fb_dump_mode_info(char *driver, video_adapter_t *adp,
|
||||
int fb_type(int adp_type);
|
||||
int fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_DEV_FB_FBREG_H_ */
|
||||
|
@ -64,7 +64,7 @@
|
||||
#define VGA_UNIT(dev) minor(dev)
|
||||
#define VGA_MKMINOR(unit) (unit)
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
struct video_adapter;
|
||||
typedef struct vga_softc {
|
||||
@ -92,6 +92,6 @@ int vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset,
|
||||
|
||||
extern int (*vga_sub_configure)(int flags);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _DEV_FB_VGAREG_H_ */
|
||||
|
@ -30,7 +30,7 @@
|
||||
* I2C bus IP driver
|
||||
*/
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
@ -48,7 +48,7 @@
|
||||
#include <net/if_types.h>
|
||||
#include <net/netisr.h>
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/netisr.h>
|
||||
|
@ -133,7 +133,7 @@
|
||||
#define PSM_BALLPOINT_ID 2
|
||||
#define PSM_INTELLI_ID 3
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define ATKBDC_DRIVER_NAME "atkbdc"
|
||||
|
||||
@ -242,6 +242,6 @@ void kbdc_set_device_mask(KBDC kbdc, int mask);
|
||||
int get_controller_command_byte(KBDC kbdc);
|
||||
int set_controller_command_byte(KBDC kbdc, int command, int flag);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_DEV_KBD_ATKBDCREG_H_ */
|
||||
|
@ -36,12 +36,12 @@
|
||||
#define KB_CONF_NO_RESET (1 << 1) /* don't reset the keyboard */
|
||||
#define KB_CONF_ALT_SCANCODESET (1 << 2) /* assume the XT type keyboard */
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
int atkbd_probe_unit(int unit, int port, int irq, int flags);
|
||||
int atkbd_attach_unit(int unit, keyboard_t **kbd,
|
||||
int port, int irq, int flags);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* !_DEV_KBD_ATKBDREG_H_ */
|
||||
|
@ -164,7 +164,7 @@ typedef struct keyboard_driver {
|
||||
int (*configure)(int); /* backdoor for the console driver */
|
||||
} keyboard_driver_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define KEYBOARD_DRIVER(name, sw, config) \
|
||||
static struct keyboard_driver name##_kbd_driver = { \
|
||||
@ -252,6 +252,6 @@ int genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg);
|
||||
int genkbd_keyaction(keyboard_t *kbd, int keycode, int down,
|
||||
int *shiftstate, int *accents);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_DEV_KBD_KBDREG_H_ */
|
||||
|
@ -144,7 +144,7 @@ struct mii_attach_args {
|
||||
};
|
||||
typedef struct mii_attach_args mii_attach_args_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define PHY_READ(p, r) \
|
||||
MIIBUS_READREG((p)->mii_dev, (p)->mii_phy, (r))
|
||||
@ -173,6 +173,6 @@ int mii_phy_auto __P((struct mii_softc *, int));
|
||||
void mii_phy_reset __P((struct mii_softc *));
|
||||
|
||||
void ukphy_status __P((struct mii_softc *));
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _DEV_MII_MIIVAR_H_ */
|
||||
|
@ -33,7 +33,7 @@
|
||||
* Thanks to David Campbell work on the Linux driver and the Iomega specs
|
||||
* Thanks to Thiebault Moeglin for the drive
|
||||
*/
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -41,11 +41,11 @@
|
||||
|
||||
#include <machine/clock.h>
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/kernel.h>
|
||||
#endif /*KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#include "opt_vpo.h"
|
||||
|
||||
|
@ -103,14 +103,14 @@ static int lpbb_ppb_attach(struct ppb_device *dev);
|
||||
static struct lpbb_softc *lpbbdata[MAXLPBB];
|
||||
static int nlpbb = 0;
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
static struct ppb_driver lpbbdriver = {
|
||||
lpbb_ppb_probe, lpbb_ppb_attach, "lpbb"
|
||||
};
|
||||
DATA_SET(ppbdriver_set, lpbbdriver);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
static int
|
||||
lpbb_probe(device_t dev)
|
||||
|
@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -75,7 +75,7 @@
|
||||
|
||||
#include <machine/clock.h>
|
||||
#include <machine/lpt.h>
|
||||
#endif /*KERNEL*/
|
||||
#endif
|
||||
|
||||
#include <dev/ppbus/ppbconf.h>
|
||||
#include <dev/ppbus/ppb_1284.h>
|
||||
@ -154,14 +154,14 @@ static void lptintr(int unit);
|
||||
|
||||
static void lpt_intr(int unit); /* without spls */
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
static struct ppb_driver lptdriver = {
|
||||
lptprobe, lptattach, LPT_NAME
|
||||
};
|
||||
DATA_SET(ppbdriver_set, lptdriver);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
/* bits for state */
|
||||
#define OPEN (1<<0) /* device is open */
|
||||
|
@ -29,7 +29,7 @@
|
||||
#ifndef __PPI_H
|
||||
#define __PPI_H
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
@ -27,7 +27,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#include <machine/clock.h>
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#include <cam/cam.h>
|
||||
#include <cam/cam_ccb.h>
|
||||
@ -47,9 +47,9 @@
|
||||
#include <cam/scsi/scsi_message.h>
|
||||
#include <cam/scsi/scsi_da.h>
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/kernel.h>
|
||||
#endif /*KERNEL */
|
||||
#endif
|
||||
|
||||
#include "opt_vpo.h"
|
||||
|
||||
@ -87,7 +87,7 @@ static int nvpo = 0;
|
||||
#define MAXVP0 8 /* XXX not much better! */
|
||||
static struct vpo_data *vpodata[MAXVP0];
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* Make ourselves visible as a ppbus driver
|
||||
@ -100,7 +100,7 @@ static struct ppb_driver vpodriver = {
|
||||
};
|
||||
DATA_SET(ppbdriver_set, vpodriver);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* vpoprobe()
|
||||
|
@ -27,7 +27,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -35,11 +35,11 @@
|
||||
|
||||
#include <machine/clock.h>
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/kernel.h>
|
||||
#endif /*KERNEL */
|
||||
#endif
|
||||
|
||||
#include "opt_vpo.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include "pcm.h"
|
||||
#else
|
||||
#error why?
|
||||
@ -42,7 +42,7 @@
|
||||
#ifndef _OS_H_
|
||||
#define _OS_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ioccom.h>
|
||||
@ -85,7 +85,7 @@ struct isa_device { int dummy; };
|
||||
#define d_write_t void
|
||||
#define d_ioctl_t void
|
||||
#define d_select_t void
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _OS_H_ */
|
||||
|
||||
@ -146,7 +146,7 @@ int fkchan_setup(pcm_channel *c);
|
||||
#define ON 1
|
||||
#define OFF 0
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* some macros for debugging purposes
|
||||
@ -167,7 +167,7 @@ u_int32_t pcm_getflags(device_t dev);
|
||||
void pcm_setflags(device_t dev, u_int32_t val);
|
||||
void pcm_setswap(device_t dev, pcm_swap_t *swap);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/* usage of flags in device config entry (config file) */
|
||||
#define DV_F_DRQ_MASK 0x00000007 /* mask for secondary drq */
|
||||
|
@ -53,7 +53,7 @@
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#elif defined(__FreeBSD__)
|
||||
#if defined(KERNEL)
|
||||
#if defined(_KERNEL)
|
||||
#include <sys/malloc.h>
|
||||
|
||||
MALLOC_DECLARE(M_USB);
|
||||
@ -61,7 +61,7 @@ MALLOC_DECLARE(M_USBDEV);
|
||||
MALLOC_DECLARE(M_USBHC);
|
||||
|
||||
#include <dev/usb/usb_port.h>
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
|
||||
|
@ -51,12 +51,12 @@ extern int debug; /* debug flags */
|
||||
printf (msg); \
|
||||
longjmp (command_fail, -1); \
|
||||
}
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
struct vnode;
|
||||
struct proc;
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
int vinum_inactive(int);
|
||||
void free_vinum(int);
|
||||
int give_sd_to_plex(int plexno, int sdno);
|
||||
|
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include "opt_vinum.h"
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -62,7 +62,7 @@
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/queue.h>
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <machine/setjmp.h>
|
||||
#include <machine/stdarg.h>
|
||||
#else
|
||||
@ -77,7 +77,7 @@
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#undef Free /* defined in some funny net stuff */
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#ifdef VINUMDEBUG
|
||||
#define Malloc(x) MMalloc ((x), __FILE__, __LINE__) /* show where we came from */
|
||||
#define Free(x) FFree ((x), __FILE__, __LINE__) /* show where we came from */
|
||||
|
@ -57,7 +57,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#include <sys/systm.h>
|
||||
#else
|
||||
#include <ctype.h>
|
||||
@ -115,7 +115,7 @@ struct _keywords keywords[] =
|
||||
keypair(prefer),
|
||||
keypair(rename),
|
||||
keypair(detached),
|
||||
#ifndef KERNEL /* for vinum(8) only */
|
||||
#ifndef _KERNEL /* for vinum(8) only */
|
||||
#ifdef VINUMDEBUG
|
||||
keypair(debug),
|
||||
keypair(stripe),
|
||||
@ -159,7 +159,7 @@ struct _keywords keywords[] =
|
||||
};
|
||||
struct keywordset keyword_set = KEYWORDSET(keywords);
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
struct _keywords flag_keywords[] =
|
||||
{flagkeypair(f),
|
||||
flagkeypair(d),
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#include <dev/vinum/vinumhdr.h>
|
||||
#include <dev/vinum/statetexts.h>
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <stdio.h>
|
||||
extern jmp_buf command_fail; /* return on a failed command */
|
||||
#endif
|
||||
@ -219,14 +219,14 @@ sizespec(char *spec)
|
||||
return size * sign * 1024 * 1024 * 1024;
|
||||
}
|
||||
}
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
throw_rude_remark(EINVAL, "Invalid length specification: %s", spec);
|
||||
#else
|
||||
fprintf(stderr, "Invalid length specification: %s", spec);
|
||||
longjmp(command_fail, -1);
|
||||
#endif
|
||||
}
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
throw_rude_remark(EINVAL, "Missing length specification");
|
||||
#else
|
||||
fprintf(stderr, "Missing length specification");
|
||||
|
@ -643,7 +643,7 @@ enum debugflags {
|
||||
DEBUG_WARNINGS = 512, /* log various relatively harmless warnings */
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#define longjmp LongJmp /* test our longjmps */
|
||||
#endif
|
||||
#endif
|
||||
|
@ -145,7 +145,7 @@ struct wi_sigcache {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
struct wi_counters {
|
||||
u_int32_t wi_tx_unicast_frames;
|
||||
u_int32_t wi_tx_multicast_frames;
|
||||
|
@ -31,6 +31,8 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)dirent.h 5.18 (Berkeley) 2/23/91
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _DIRENT_H_
|
||||
@ -103,6 +105,6 @@ int getdirentries __P((int, char *, int, long *));
|
||||
#endif /* not POSIX */
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !KERNEL */
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#endif /* !_DIRENT_H_ */
|
||||
|
@ -103,7 +103,7 @@ struct disklabel {
|
||||
* as found in /boot. These are returned when using
|
||||
* getdiskbyname(3) to retrieve the values from /etc/disktab.
|
||||
*/
|
||||
#if defined(KERNEL) || defined(STANDALONE)
|
||||
#if defined(_KERNEL) || defined(STANDALONE)
|
||||
char d_packname[16]; /* pack identifier */
|
||||
#else
|
||||
union {
|
||||
@ -116,7 +116,7 @@ struct disklabel {
|
||||
#define d_packname d_un.un_d_packname
|
||||
#define d_boot0 d_un.un_b.un_d_boot0
|
||||
#define d_boot1 d_un.un_b.un_d_boot1
|
||||
#endif /* ! KERNEL or STANDALONE */
|
||||
#endif /* ! _KERNEL or STANDALONE */
|
||||
/* disk geometry: */
|
||||
u_long d_secsize; /* # of bytes per sector */
|
||||
u_long d_nsectors; /* # of data sectors per track */
|
||||
@ -387,7 +387,7 @@ char * readMBRtolabel __P(( dev_t dev , void (*strat)(), register struct disklab
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(KERNEL) && !defined(LOCORE)
|
||||
#if !defined(_KERNEL) && !defined(LOCORE)
|
||||
|
||||
#include "cdefs.h"
|
||||
|
||||
|
@ -461,5 +461,5 @@ extern void setblock(struct fs *, u_char *, daddr_t);
|
||||
extern ino_t dirpref(struct fs *);
|
||||
extern daddr_t mapsearch(struct fs *, struct cg *, daddr_t, int);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* _UFS_FS_H_ */
|
||||
|
@ -264,5 +264,5 @@ extern int indirtrunc(struct inode *, daddr_t, daddr_t, int, long *);
|
||||
extern int bmap(struct inode *, daddr_t, daddr_t *);
|
||||
extern int balloc(struct inode *, daddr_t, int, struct buf **, int);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* _UFS_INODE_H_ */
|
||||
|
@ -204,5 +204,5 @@ __BEGIN_DECLS
|
||||
int quotactl __P((const char *, int, int, void *));
|
||||
__END_DECLS
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* _QUOTA_ */
|
||||
|
@ -153,7 +153,7 @@ typedef struct fd_set {
|
||||
#define FD_COPY(f, t) bcopy(f, t, sizeof(*(f)))
|
||||
#define FD_ZERO(p) bzero(p, sizeof(*(p)))
|
||||
|
||||
#if defined(__STDC__) && defined(KERNEL)
|
||||
#if defined(__STDC__) && defined(_KERNEL)
|
||||
/*
|
||||
* Forward structure declarations for function prototypes. We include the
|
||||
* common structures that cross subsystem boundaries here; others are mostly
|
||||
|
@ -43,16 +43,14 @@ INCLUDES+= -I$S/../include
|
||||
.else
|
||||
INCLUDES+= -I/usr/include
|
||||
.endif
|
||||
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
|
||||
# KAME mandatory flags
|
||||
COPTS+= -D_KERNEL
|
||||
COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h
|
||||
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
|
||||
|
||||
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
|
||||
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
|
||||
|
||||
# Use the default object format for genassym, etc.
|
||||
GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -UKERNEL
|
||||
GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -U_KERNEL
|
||||
|
||||
# Select the correct set of tools. Can't set OBJFORMAT here because it
|
||||
# doesn't get exported into the environment, and if it were exported
|
||||
|
@ -56,9 +56,9 @@
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/vm_map.h>
|
||||
#define KERNEL /* Avoid userland compatability headers */
|
||||
#define _KERNEL /* Avoid userland compatability headers */
|
||||
#include <sys/user.h>
|
||||
#undef KERNEL
|
||||
#undef _KERNEL
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <nfs/nfsv2.h>
|
||||
|
@ -18,7 +18,7 @@
|
||||
#ifndef _MACHINE_APM_BIOS_H_
|
||||
#define _MACHINE_APM_BIOS_H_
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
@ -148,7 +148,7 @@ struct apmhook {
|
||||
#define APM_HOOK_RESUME 1
|
||||
#define NAPM_HOOK 2
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
void apm_suspend(int state);
|
||||
struct apmhook *apm_hook_establish (int apmh, struct apmhook *);
|
||||
@ -156,7 +156,7 @@ void apm_hook_disestablish (int apmh, struct apmhook *);
|
||||
void apm_cpu_idle(void);
|
||||
void apm_cpu_busy(void);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* !ASSEMBLER && !INITIALIZER */
|
||||
|
||||
|
@ -67,7 +67,7 @@ struct bootinfo {
|
||||
u_int32_t bi_modulep; /* preloaded modules */
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern struct bootinfo bootinfo;
|
||||
#endif
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef _MACHINE_CLOCK_H_
|
||||
#define _MACHINE_CLOCK_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* i386 to clock driver interface.
|
||||
* XXX large parts of the driver and its interface are misplaced.
|
||||
@ -46,6 +46,6 @@ int release_timer1 __P((void));
|
||||
int sysbeep __P((int pitch, int period));
|
||||
void i8254_restore __P((void));
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_CLOCK_H_ */
|
||||
|
@ -124,7 +124,7 @@
|
||||
{ "wall_cmos_clock", CTLTYPE_INT }, \
|
||||
}
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern int astpending;
|
||||
extern char btext[];
|
||||
extern char etext[];
|
||||
|
@ -240,7 +240,7 @@ invd(void)
|
||||
__asm __volatile("invd");
|
||||
}
|
||||
|
||||
#if defined(SMP) && defined(KERNEL)
|
||||
#if defined(SMP) && defined(_KERNEL)
|
||||
|
||||
/*
|
||||
* When using APIC IPI's, invlpg() is not simply the invlpg instruction
|
||||
@ -271,7 +271,7 @@ cpu_invltlb(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#else /* !(SMP && KERNEL) */
|
||||
#else /* !(SMP && _KERNEL) */
|
||||
|
||||
static __inline void
|
||||
invlpg(u_int addr)
|
||||
@ -294,7 +294,7 @@ invltlb(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* SMP && KERNEL */
|
||||
#endif /* SMP && _KERNEL */
|
||||
|
||||
static __inline u_short
|
||||
inw(u_int port)
|
||||
|
@ -12,6 +12,8 @@
|
||||
* all derivative works or modified versions.
|
||||
*
|
||||
* Version 1.9, Wed Oct 4 18:58:15 MSK 1995
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
/*
|
||||
* Asynchronous channel mode -------------------------------------------------
|
||||
@ -409,7 +411,7 @@ typedef struct _chan_t {
|
||||
unsigned long btphys; /* transmitter B phys address */
|
||||
unsigned char dtr; /* DTR signal value */
|
||||
unsigned char rts; /* RTS signal value */
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
struct tty *ttyp; /* tty structure pointer */
|
||||
struct ifnet *ifp; /* network interface data */
|
||||
struct ifnet *master; /* master interface, or ==ifp */
|
||||
@ -465,7 +467,7 @@ typedef struct _board_t {
|
||||
|
||||
#define CX_SPEED_DFLT 9600
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
int cx_probe_board (int port);
|
||||
void cx_init (cx_board_t *b, int num, int port, int irq, int dma);
|
||||
void cx_setup_board (cx_board_t *b);
|
||||
|
@ -118,7 +118,7 @@ __ElfType(Auxinfo);
|
||||
#define ELF_TARG_MACH EM_386
|
||||
#define ELF_TARG_VER 1
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* On the i386 we load the dynamic linker where a userland call
|
||||
@ -129,5 +129,5 @@ __ElfType(Auxinfo);
|
||||
#define ELF_RTLD_ADDR(vmspace) \
|
||||
(round_page((vm_offset_t)(vmspace)->vm_daddr + MAXDSIZ))
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_MACHINE_ELF_H_ */
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
@ -73,7 +73,7 @@ __extension__ ({ register u_long __X = (x); \
|
||||
: "0" (__X)); \
|
||||
__X; })
|
||||
|
||||
#if defined(KERNEL) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)) && !defined(I386_CPU)
|
||||
#if defined(_KERNEL) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)) && !defined(I386_CPU)
|
||||
|
||||
#define __byte_swap_long(x) \
|
||||
__extension__ ({ register u_long __X = (x); \
|
||||
|
@ -29,7 +29,7 @@
|
||||
#ifndef _MACHINE_GLOBALS_H_
|
||||
#define _MACHINE_GLOBALS_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define GLOBAL_LVALUE(name, type) \
|
||||
(*(type *)_global_ptr_##name())
|
||||
@ -140,6 +140,6 @@ GLOBAL_FUNC(prv_PADDR1)
|
||||
|
||||
#define SET_CURPROC(x) (_global_curproc_set_nv((int)x))
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_GLOBALS_H_ */
|
||||
|
@ -145,7 +145,7 @@ struct wi_sigcache {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
struct wi_counters {
|
||||
u_int32_t wi_tx_unicast_frames;
|
||||
u_int32_t wi_tx_multicast_frames;
|
||||
|
@ -93,9 +93,9 @@ u_int in_cksum_hdr __P((const struct ip *));
|
||||
#endif
|
||||
|
||||
typedef unsigned in_psum_t;
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
in_psum_t in_cksum_partial(in_psum_t psum, const u_short *w, int len);
|
||||
int in_cksum_finalize(in_psum_t psum);
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _MACHINE_IN_CKSUM_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>
|
||||
|
@ -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>
|
||||
|
@ -136,7 +136,7 @@ struct save87 {
|
||||
#define __INITIAL_NPXCW__ __BDE_NPXCW__
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
#ifndef npxproc
|
||||
extern struct proc *npxproc;
|
||||
#endif
|
||||
|
@ -108,13 +108,13 @@ struct vesa_mode
|
||||
u_int16_t v_offscreensize;
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define VESA_MODE(x) ((x) >= M_VESA_BASE)
|
||||
|
||||
int vesa_load_ioctl(void);
|
||||
int vesa_unload_ioctl(void);
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif
|
||||
|
||||
#endif /* !_MACHINE_PC_VESA_H */
|
||||
|
@ -89,7 +89,7 @@ struct pcb {
|
||||
struct md_coredump {
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#ifndef curpcb
|
||||
extern struct pcb *curpcb; /* our current running pcb */
|
||||
|
@ -51,7 +51,7 @@ struct pcb_ldt {
|
||||
struct segment_descriptor ldt_sd;
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#ifdef USER_LDT
|
||||
void set_user_ldt __P((struct pcb *));
|
||||
|
@ -45,7 +45,7 @@
|
||||
*
|
||||
*
|
||||
* @(#)ioctl_pcvt.h, 3.20, Last Edit-Date: [Fri Apr 7 10:17:13 1995]
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
@ -70,7 +70,7 @@
|
||||
#define PCVTIDMAJOR 3 /* driver id - major release */
|
||||
#define PCVTIDMINOR 20 /* driver id - minor release */
|
||||
|
||||
#if !defined(KERNEL) && !defined(_KERNEL)
|
||||
#if !defined(_KERNEL)
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
@ -37,7 +37,7 @@
|
||||
#ifndef _MACHINE_PERFMON_H_
|
||||
#define _MACHINE_PERFMON_H_
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
@ -93,7 +93,7 @@ struct pmc_tstamp {
|
||||
quad_t pmct_value;
|
||||
};
|
||||
|
||||
#ifndef KERNEL
|
||||
#ifndef _KERNEL
|
||||
|
||||
#define _PATH_PERFMON "/dev/perfmon"
|
||||
|
||||
@ -112,7 +112,7 @@ int perfmon_stop __P((int));
|
||||
int perfmon_read __P((int, quad_t *));
|
||||
int perfmon_reset __P((int));
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* Pentium Pro performance counters, from Appendix B.
|
||||
|
@ -137,14 +137,14 @@ typedef unsigned int *pt_entry_t;
|
||||
* Address of current and alternate address space page table maps
|
||||
* and directories.
|
||||
*/
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern pt_entry_t PTmap[], APTmap[], Upte;
|
||||
extern pd_entry_t PTD[], APTD[], PTDpde, APTDpde, Upde;
|
||||
|
||||
extern pd_entry_t IdlePTD; /* physical address of "Idle" state directory */
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* virtual address to page table entry and
|
||||
* to physical address. Likewise for alternate address space.
|
||||
@ -208,7 +208,7 @@ struct pmap {
|
||||
|
||||
typedef struct pmap *pmap_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
extern pmap_t kernel_pmap;
|
||||
#endif
|
||||
|
||||
@ -229,7 +229,7 @@ typedef struct pv_entry {
|
||||
#define PV_CI 0x01 /* all entries must be cache inhibited */
|
||||
#define PV_PTPAGE 0x02 /* entry maps a page table page */
|
||||
|
||||
#ifdef KERNEL
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define NPPROVMTRR 8
|
||||
#define PPRO_VMTRRphysBase0 0x200
|
||||
@ -260,7 +260,7 @@ vm_page_t pmap_use_pt __P((pmap_t, vm_offset_t));
|
||||
void pmap_set_opt __P((void));
|
||||
#endif
|
||||
|
||||
#endif /* KERNEL */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !LOCORE */
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user