# $NetBSD: genassym.cf,v 1.55 2020/02/20 08:27:40 skrll Exp $ # # Copyright (c) 1997 Ludd, University of Lule}, Sweden. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, 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. # quote #define __MUTEX_PRIVATE quote #define __RWLOCK_PRIVATE include include include include include include include include include include include include include include include include define L_PCB offsetof(struct lwp, l_addr) define L_CPU offsetof(struct lwp, l_cpu) define L_PROC offsetof(struct lwp, l_proc) define L_PRIVATE offsetof(struct lwp, l_private) define P_VMSPACE offsetof(struct proc, p_vmspace) define P_MD_SYSCALL offsetof(struct proc, p_md.md_syscall) define P0BR offsetof(struct pcb, P0BR) define P0LR offsetof(struct pcb, P0LR) define P1BR offsetof(struct pcb, P1BR) define P1LR offsetof(struct pcb, P1LR) define ESP offsetof(struct pcb, ESP) define SSP offsetof(struct pcb, SSP) define KSP offsetof(struct pcb, KSP) define PCB_R0 offsetof(struct pcb, R[0]) define PCB_R1 offsetof(struct pcb, R[1]) define PCB_R6 offsetof(struct pcb, R[6]) define PCB_R7 offsetof(struct pcb, R[7]) define PCB_AP offsetof(struct pcb, AP) define PCB_FP offsetof(struct pcb, FP) define PCB_PC offsetof(struct pcb, PC) define PCB_PSL offsetof(struct pcb, PSL) define PCB_PADDR offsetof(struct pcb, pcb_paddr) define PCB_ONFAULT offsetof(struct pcb, pcb_onfault) define SOFTINT_CLOCK SOFTINT_CLOCK define SOFTINT_BIO SOFTINT_BIO define SOFTINT_NET SOFTINT_NET define SOFTINT_SERIAL SOFTINT_SERIAL define MCHK offsetof(struct cpu_dep, cpu_mchk) define MEMERR offsetof(struct cpu_dep, cpu_memerr) define BADADDR offsetof(struct cpu_dep, cpu_badaddr) define M_DATA offsetof(struct mbuf, m_data) define M_LEN offsetof(struct mbuf, m_len) define M_NEXT offsetof(struct mbuf, m_next) define KERNBASE KERNBASE ifdef MULTIPROCESSOR define CI_CURLWP offsetof(struct cpu_info, ci_curlwp) endif define CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) define CI_MTX_OLDSPL offsetof(struct cpu_info, ci_mtx_oldspl) define CI_SOFTLWPS offsetof(struct cpu_info, ci_softlwps) define CI_CAS_ADDR offsetof(struct cpu_info, ci_cas_addr) define CI_NINTR offsetof(struct cpu_info, ci_data.cpu_nintr) define CI_NSOFT offsetof(struct cpu_info, ci_data.cpu_nsoft) # mtpr register numbers define PR_KSP PR_KSP define PR_ESP PR_ESP define PR_SSP PR_SSP define PR_USP PR_USP define PR_ICCS PR_ICCS define PR_PCBB PR_PCBB define PR_IPL PR_IPL define PR_SBIFS PR_SBIFS define PR_EHSR PR_EHSR define PR_MCESR PR_MCESR define PR_P0BR PR_P0BR define PR_P1BR PR_P1BR define PR_P0LR PR_P0LR define PR_P1LR PR_P1LR define PR_SCBB PR_SCBB # trap numbering define T_KSPNOTVAL T_KSPNOTVAL define T_PRIVINFLT T_PRIVINFLT define T_XFCFLT T_XFCFLT define T_RESOPFLT T_RESOPFLT define T_RESADFLT T_RESADFLT define T_TRANSFLT T_TRANSFLT define T_PTEFETCH T_PTEFETCH define T_WRITE T_WRITE define T_ACCFLT T_ACCFLT define T_PTELEN T_PTELEN define T_TRCTRAP T_TRCTRAP define T_BPTFLT T_BPTFLT define T_ARITHFLT T_ARITHFLT define T_SYSCALL T_SYSCALL define T_ASTFLT T_ASTFLT define T_KDBTRAP T_KDBTRAP define CASMAGIC CASMAGIC define USPACE USPACE define TRAPFRAMELEN sizeof(struct trapframe) define CALLSFRAMELEN sizeof(struct callsframe) define CA_ARGNO offsetof(struct callsframe, ca_argno) define ENAMETOOLONG ENAMETOOLONG define EFAULT EFAULT define EV_COUNT offsetof(struct evcnt, ev_count) define SYS_compat_16___sigreturn14 SYS_compat_16___sigreturn14 define SYS_exit SYS_exit define SYS__lwp_getprivate SYS__lwp_getprivate define VAX_TYP_UV2 VAX_TYP_UV2 define VAX_TYP_8SS VAX_TYP_8SS define VAX_BTYP_46 VAX_BTYP_46 define VAX_BTYP_48 VAX_BTYP_48 define VAX_BTYP_49 VAX_BTYP_49 define IPL_HIGH IPL_HIGH define IPL_CLOCK IPL_CLOCK define IPL_SCHED IPL_SCHED define IPL_VM IPL_VM define IPL_NONE IPL_NONE define VC_DIAGTIMM offsetof(struct vs_cpu, vc_diagtimm) define PSL_IS PSL_IS define PSL_HIGHIPL PSL_HIGHIPL define MTX_OWNER offsetof(struct kmutex, mtx_owner) define MTX_LOCK offsetof(struct kmutex, mtx_lock) define MTX_IPL offsetof(struct kmutex, mtx_ipl) define RW_OWNER offsetof(struct krwlock, rw_owner) define RW_HAS_WAITERS RW_HAS_WAITERS define RW_WRITE_LOCKED RW_WRITE_LOCKED define RW_WRITE_WANTED RW_WRITE_WANTED define RW_READ_INCR RW_READ_INCR define RW_THREAD RW_THREAD define RW_READER RW_READER define RW_WRITER RW_WRITER