/* $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: gate.h 1.9 89/08/07 $"

#ifndef	_SYS_GATE_H_

/*
 * gate.h
 *	Gate definitions and allocations.  i386 version.
 *
 * SLIC gates are not used in the i386 kernel, rather bytes of memory
 * serve as spin locks.
 *
 * Several of the gates are used directly.  These are represented
 * by individual bytes of memory (see machine/gate_data.c).
 */

/* $Log:	gate.h,v $
 */

/*
 * Typedef for padded gates, arranges that the gates are in different
 * cache blocks.
 */

typedef	char	pgate_t[CACHESIZE];

/*
 * Explicitly referenced gates.  Set is subject to change.
 */

extern	pgate_t		g_time;			/* time and timeout queue */
#define	G_TIME		(*(gate_t *)g_time)

extern	pgate_t		g_runq;			/* dispatcher run-queues */
#define	G_RUNQ		(*(gate_t *)g_runq)

extern	pgate_t		g_swap;			/* swapmap (vm_sw.c) */
#define	G_SWAP		(*(gate_t *)g_swap)

/*
 * G_FS (used in FSLOCK(), FSUNLOCK()) should be distributed among the
 * file-systems (ie, use a per file-sys gate, or atomic inc/dec).
 */

extern	pgate_t		g_fs;			/* file-system locking */
#define	G_FS		(*(gate_t *)g_fs)

#if defined(SLIC_GATES)
/*
 * GATE_GROUP is the "destination" (eg, group) used for gate accesses.
 * Currently defined to be everybody.
 */

#define	GATE_GROUP	(SL_GROUP|SL_ALL)
#endif	/* SLIC_GATES */

#define	_SYS_GATE_H_
#endif	/* _SYS_GATE_H_ */
