/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident	"$Header: init_global.c 1.24 90/05/03 $"

/*
 * init_global.c
 *
 * Declare various kernel global symbols that are only extern'd
 * elsewhere.
 */

/* $Log:	init_global.c,v $
 */

#include "sys/types.h"
#include "sys/devsw.h"
#include "sys/param.h"
#include "sys/debug.h"
#include "sys/signal.h"
#include "sys/mutex.h"
#include "sys/systm.h"
#include "sys/vm.h"
#include "sys/user.h"
#include "sys/timer.h"
#include "sys/proc.h"
#include "sys/session.h"
#include "sys/vfs.h"
#include "sys/vnode.h"
#include "sys/ufsinode.h"
#include "sys/ufsmount.h"
#include "sys/file.h"
#include "sys/callo.h"
#include "sys/swap.h"
#include "sys/cmap.h"
#include "sys/vmmeter.h"
#ifdef QUOTA
#include "sys/ufsquota.h"
#endif

#include "sys/engine.h"

#include "sys/pte.h"

/*
 * From systm.h...
 */

timeval_t boottime;
timeval_t time;
int	hz;
sema_t	lbolt;				/* awoken once a second */

struct	pte	zeropg[CLSIZE];		/* source of RO zeroes */

int	mpid;			/* generic for unique process id's */

int     cmpt_type = -1;
int     cmpt_swp_type = -1;

sema_t	unmount_mutex;		/* serialize unmounts */

struct	vnode	*swapdev_vp;	/* vnode equivalent of swapdev */

dev_t	rootdev;
struct	dev	*rootdevp;	/* object representation of rootdev */

/*
 * From engine.h
 */

lock_t	engtbl_lck;	/* lock all engine e_count fields */
sema_t	eng_wait;	/* on/off-line coordination */

/*
 * From proc.h
 */

short	pidhash[PIDHSZ];

/*
 * From vfs.h
 */
sema_t	vfs_mutex;

/*
 * From swap.h
 */
struct swdevt swdevt[MSFILES];
int nswdev = MSFILES;

#ifdef QUOTA
/*
 * From quota.h
 */
lock_t	quota_list;	/* lock all dquot list */
sema_t	quota_sema;	/* wait here for dquots to be released when closing */
#endif

/*
 * From vmmeter.h
 */
struct resource_ovf resource_ovf;

/*
 * The various things allocated at boot time.
 */

struct	proc	*proc		= NULL;
struct	session	*sess		= NULL;
struct	proc	*procNPROC	= NULL;
struct	inode	*inode		= NULL;
struct	mount	*mounttab	= NULL;
struct	file	*file		= NULL;
struct	callout	*callout	= NULL;
struct	buf	*buf		= NULL;
struct	buf	*swbuf		= NULL;
char	*buffers		= NULL;
struct	AIO_buf	*abuf		= NULL;
struct	cmap	*cmap		= NULL;
struct	cmap	*ecmap		= NULL;
#ifdef QUOTA
struct dquot	*dquot		= NULL;
struct dquot	*dquotNDQUOT	= NULL;
struct dqhead	*dqhead		= NULL;
#endif /* QUOTA */
