intr.h revision 1.14
11.14Spooka/*	$NetBSD: intr.h,v 1.14 2009/01/05 14:35:47 pooka Exp $	*/
21.1Spooka
31.1Spooka/*
41.1Spooka * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
51.1Spooka *
61.1Spooka * Development of this software was supported by Google Summer of Code.
71.1Spooka *
81.1Spooka * Redistribution and use in source and binary forms, with or without
91.1Spooka * modification, are permitted provided that the following conditions
101.1Spooka * are met:
111.1Spooka * 1. Redistributions of source code must retain the above copyright
121.1Spooka *    notice, this list of conditions and the following disclaimer.
131.1Spooka * 2. Redistributions in binary form must reproduce the above copyright
141.1Spooka *    notice, this list of conditions and the following disclaimer in the
151.1Spooka *    documentation and/or other materials provided with the distribution.
161.1Spooka *
171.1Spooka * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
181.1Spooka * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
191.1Spooka * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
201.1Spooka * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
211.1Spooka * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221.1Spooka * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
231.1Spooka * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241.1Spooka * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251.1Spooka * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261.1Spooka * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271.1Spooka * SUCH DAMAGE.
281.1Spooka */
291.1Spooka
301.1Spooka#ifndef _SYS_RUMP_INTR_H_
311.1Spooka#define _SYS_RUMP_INTR_H_
321.1Spooka
331.14Spooka#ifndef _LOCORE
341.14Spooka
351.5Sadtypedef uint8_t ipl_t;
361.5Sadtypedef struct {
371.5Sad        ipl_t _ipl;
381.5Sad} ipl_cookie_t;
391.5Sad
401.14Spooka#endif /* !_LOCORE */
411.14Spooka
421.6Spookaint  rump_splfoo(void);
431.6Spookavoid rump_splx(int);
441.6Spooka
451.1Spooka#define spllower(x) ((void)0)
461.1Spooka#define splraise(x) 0
471.6Spooka#define splsoftnet() rump_splfoo()
481.12Spooka#define splsoftclock() rump_splfoo()
491.6Spooka#define splhigh() rump_splfoo()
501.7Sad#define splsched() rump_splfoo()
511.6Spooka#define splvm() rump_splfoo()
521.6Spooka#define splx(x) rump_splx(x)
531.9Spooka#define spl0() ((void)0)
541.1Spooka
551.1Spooka#define IPL_NONE 0
561.8Sad#define	IPL_SOFTBIO 0
571.10Spooka#define	IPL_SOFTCLOCK 0
581.11Spooka#define	IPL_SOFTNET 0
591.7Sad#define IPL_SCHED 0
601.2Spooka#define IPL_VM 0
611.13Spooka#define IPL_HIGH 0
621.1Spooka
631.1Spooka#endif /* _SYS_RUMP_INTR_H_ */
64