[BACK]Return to genassym.cf CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / pc532 / pc532

File: [cvs.NetBSD.org] / src / sys / arch / pc532 / pc532 / Attic / genassym.cf (download)

Revision 1.7, Fri May 26 00:36:49 2000 UTC (20 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.6: +2 -1 lines

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor.  Test against SONPROC as appropriate rather than
combinations of SRUN and curproc.  Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.

#	$NetBSD: genassym.cf,v 1.7 2000/05/26 00:36:49 thorpej Exp $

#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
#
# This code is derived from software contributed to Berkeley by
# William Jolitz.
#
# 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.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by the University of
#	California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
#
#	@(#)genassym.c	5.11 (Berkeley) 5/10/91
#

config long n c

include <sys/param.h>
include <sys/proc.h>
include <sys/resourcevar.h>
include <sys/device.h>
include <sys/user.h>

include <vm/vm.h>

include <uvm/uvm_extern.h>

include <machine/trap.h>
include <machine/pmap.h>
include <machine/vmparam.h>

define	SRUN			SRUN
define	SONPROC			SONPROC

define	PDSHIFT 		PDSHIFT
define	PGSHIFT 		PGSHIFT
define	PGOFSET 		PGOFSET
define	NBPG			NBPG

define	PDE_SIZE		sizeof(pd_entry_t)

define	KERNBASE		KERNBASE

define	VM_MAXUSER_ADDRESS	VM_MAXUSER_ADDRESS

define	P_ADDR			offsetof(struct proc, p_addr)
define	P_BACK			offsetof(struct proc, p_back)
define	P_FORW			offsetof(struct proc, p_forw)
define	P_PRIORITY		offsetof(struct proc, p_priority)
define	P_STAT			offsetof(struct proc, p_stat)
define	P_WCHAN 		offsetof(struct proc, p_wchan)
define	P_VMSPACE		offsetof(struct proc, p_vmspace)
define	P_FLAG			offsetof(struct proc, p_flag)
define	P_PID			offsetof(struct proc, p_pid)

define	V_INTR			offsetof(struct uvmexp, intrs)

define	PCB_ONSTACK		offsetof(struct pcb, pcb_onstack)
define	PCB_FSR 		offsetof(struct pcb, pcb_fsr)
define	PCB_KSP 		offsetof(struct pcb, pcb_ksp)
define	PCB_KFP 		offsetof(struct pcb, pcb_kfp)
define	PCB_PTB 		offsetof(struct pcb, pcb_ptb)
define	PCB_ONFAULT		offsetof(struct pcb, pcb_onfault)
define	PCB_F0			offsetof(struct pcb, pcb_freg[0])
define	PCB_F1			offsetof(struct pcb, pcb_freg[1])
define	PCB_F2			offsetof(struct pcb, pcb_freg[2])
define	PCB_F3			offsetof(struct pcb, pcb_freg[3])
define	PCB_F4			offsetof(struct pcb, pcb_freg[4])
define	PCB_F5			offsetof(struct pcb, pcb_freg[5])
define	PCB_F6			offsetof(struct pcb, pcb_freg[6])
define	PCB_F7			offsetof(struct pcb, pcb_freg[7])

define	REGS_USP		offsetof(struct reg, r_sp)
define	REGS_FP 		offsetof(struct reg, r_fp)
define	REGS_SB 		offsetof(struct reg, r_sb)
define	REGS_PSR		offsetof(struct reg, r_psr)

define	SIGF_HANDLER		offsetof(struct sigframe, sf_handler)
define	SIGF_SC 		offsetof(struct sigframe, sf_sc)

define	IV_VEC			offsetof(struct iv, iv_vec)
define	IV_ARG			offsetof(struct iv, iv_arg)
define	IV_CNT			offsetof(struct iv, iv_cnt)
define	IV_USE			offsetof(struct iv, iv_use)
define	IV_MASK 		offsetof(struct iv, iv_mask)
define	IV_SIZE 		sizeof(struct iv)