/*
 * $Header: /smsa/bsd:include/sys/systm.h:bsd  1.11  $
 * $Source: /smsa/bsd:include/sys/systm.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 *
 */
/*	@(#)systm.h	2.1 88/05/18 4.0NFSSRC SMI;	*/
/*	@(#)systm.h	1.3 87/05/29 3.2/4.3NFSSRC */
/*
 * Copyright (c) 1982, 1986 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *	@(#)systm.h	7.1 (Berkeley) 6/4/86
 */

#ifndef	__sys_systm_h
#define	__sys_systm_h

/*
 * Random set of variables
 * used by more than one
 * routine.
 */

#ifdef	_KERNEL

/*
 * Current cpu priority
 */
extern	int cpu_priority;

/*
 * Nblkdev is the number of entries
 * (rows) in the block switch. It is
 * statically initialised in conf.c.
 * Used in bounds checking on major
 * device numbers.
 */
int	nblkdev;

/*
 * Number of character switch entries.
 * Statically initialised in conf.c.
 */
int	nchrdev;

int	mpid;			/* generic for unique process id's */
char	runin;			/* scheduling flag */
char	runout;			/* scheduling flag */
int	runrun;			/* scheduling flag */
char	kmapwnt;		/* kernel map want flag */
char	curpri;			/* more scheduling */

int	maxmem;			/* actual max memory per process */
int	physmem;		/* physical memory on this CPU */

int	updlock;		/* lock for sync */
daddr_t	rablock;		/* block to be read ahead */
int	rasize;			/* size of block in rablock */

dev_t	rootdev;		/* device of the root */
dev_t	swapdev;		/* device of the primary swap area */

struct vnode *rootvp;           /* vnode of root filesystem */
long	dumplo;			/* offset into dumpdev */
long	dumpsize;
dev_t	vm_sw_dev;		/* swapping fake device see vm_sw.c */
struct vnode	*swapdev_vp;	/* vnode equivalent to above */

extern	int icode[];		/* user init code */
extern	int szicode;		/* its size */

daddr_t	bmap();
caddr_t	calloc();
int	memall();
int	vmemall();
caddr_t	wmemall();
caddr_t	kmem_alloc();
swblk_t	vtod();
struct vnode *bdevvp();
struct vnode *specvp();

#endif/*_KERNEL*/

#ifdef	_KERNEL

int	noproc;			/* no one is running just now */
char	*panicstr;
int	wantin;
int	boothowto;		/* reboot flags, from console subsystem */
int	selwait;

/* casts to keep lint happy */
#define	insque(q,p)	_insque((caddr_t)q,(caddr_t)p)
#define	remque(q)	_remque((caddr_t)q)

#endif/*_KERNEL*/

#endif/*__sys_systm_h*/

/* EOF systm.h */
