1129198Scognet/* $NetBSD: psl.h,v 1.6 2003/06/16 20:00:58 thorpej Exp $ */ 2129198Scognet 3139735Simp/*- 4129198Scognet * Copyright (c) 1995 Mark Brinicombe. 5129198Scognet * All rights reserved. 6129198Scognet * 7129198Scognet * Redistribution and use in source and binary forms, with or without 8129198Scognet * modification, are permitted provided that the following conditions 9129198Scognet * are met: 10129198Scognet * 1. Redistributions of source code must retain the above copyright 11129198Scognet * notice, this list of conditions and the following disclaimer. 12129198Scognet * 2. Redistributions in binary form must reproduce the above copyright 13129198Scognet * notice, this list of conditions and the following disclaimer in the 14129198Scognet * documentation and/or other materials provided with the distribution. 15129198Scognet * 3. All advertising materials mentioning features or use of this software 16129198Scognet * must display the following acknowledgement: 17129198Scognet * This product includes software developed by Mark Brinicombe 18129198Scognet * for the NetBSD Project. 19129198Scognet * 4. The name of the company nor the name of the author may be used to 20129198Scognet * endorse or promote products derived from this software without specific 21129198Scognet * prior written permission. 22129198Scognet * 23129198Scognet * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 24129198Scognet * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25129198Scognet * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26129198Scognet * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 27129198Scognet * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28129198Scognet * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29129198Scognet * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30129198Scognet * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31129198Scognet * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32129198Scognet * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33129198Scognet * SUCH DAMAGE. 34129198Scognet * 35129198Scognet * RiscBSD kernel project 36129198Scognet * 37129198Scognet * psl.h 38129198Scognet * 39129198Scognet * spl prototypes. 40129198Scognet * Eventually this will become a set of defines. 41129198Scognet * 42129198Scognet * Created : 21/07/95 43129198Scognet * 44129198Scognet * $FreeBSD$ 45129198Scognet */ 46129198Scognet 47129198Scognet#ifndef _MACHINE_PSL_H_ 48129198Scognet#define _MACHINE_PSL_H_ 49129198Scognet 50129198Scognet/* 51129198Scognet * These are the different SPL states 52129198Scognet * 53129198Scognet * Each state has an interrupt mask associated with it which 54129198Scognet * indicate which interrupts are allowed. 55129198Scognet */ 56129198Scognet 57129198Scognet#define _SPL_0 0 58129198Scognet#define _SPL_SOFTCLOCK 1 59129198Scognet#define _SPL_SOFTNET 2 60129198Scognet#define _SPL_BIO 3 61129198Scognet#define _SPL_NET 4 62129198Scognet#define _SPL_SOFTSERIAL 5 63129198Scognet#define _SPL_TTY 6 64129198Scognet#define _SPL_VM 7 65129198Scognet#define _SPL_AUDIO 8 66129198Scognet#define _SPL_CLOCK 9 67129198Scognet#define _SPL_STATCLOCK 10 68129198Scognet#define _SPL_HIGH 11 69129198Scognet#define _SPL_SERIAL 12 70129198Scognet#define _SPL_LEVELS 13 71129198Scognet 72129198Scognet#ifdef _KERNEL 73129198Scognet#ifndef _LOCORE 74129198Scognetextern int current_spl_level; 75129198Scognet 76129198Scognetextern u_int spl_masks[_SPL_LEVELS + 1]; 77129198Scognetextern u_int spl_smasks[_SPL_LEVELS]; 78129198Scognet#endif /* _LOCORE */ 79129198Scognet#endif /* _KERNEL */ 80129198Scognet 81129198Scognet#endif /* _ARM_PSL_H_ */ 82129198Scognet/* End of psl.h */ 83