Home | History | Annotate | Line # | Download | only in include
intr.h revision 1.1
      1  1.1  cherry /*	$NetBSD: intr.h,v 1.1 2006/04/07 14:21:18 cherry Exp $	*/
      2  1.1  cherry 
      3  1.1  cherry /* XXX: cherry: To Be fixed when we switch on interrupts. */
      4  1.1  cherry 
      5  1.1  cherry #ifndef _IA64_INTR_H_
      6  1.1  cherry #define _IA64_INTR_H_
      7  1.1  cherry 
      8  1.1  cherry #define	IPL_NONE	0	/* XXX: Placeholder */
      9  1.1  cherry #define	IPL_BIO		0	/* XXX: Placeholder */
     10  1.1  cherry #define	IPL_NET		0	/* XXX: Placeholder */
     11  1.1  cherry #define	IPL_TTY		0	/* XXX: Placeholder */
     12  1.1  cherry #define	IPL_CLOCK	0	/* XXX: Placeholder */
     13  1.1  cherry #define	IPL_HIGH	0	/* XXX: Placeholder */
     14  1.1  cherry #define	IPL_SERIAL	0	/* XXX: Placeholder */
     15  1.1  cherry #define IPL_SCHED       0       /* XXX: Placeholder */
     16  1.1  cherry #define	IPL_VM    	0	/* XXX: Placeholder */
     17  1.1  cherry 
     18  1.1  cherry #define IPL_SOFTCLOCK   0	/* XXX: Placeholder */
     19  1.1  cherry #define IPL_SOFTNET     0	/* XXX: Placeholder */
     20  1.1  cherry #define IPL_SOFTSERIAL  0	/* XXX: Placeholder */
     21  1.1  cherry 
     22  1.1  cherry static __inline int splraise(int dummy) { return 0; }
     23  1.1  cherry static __inline void spllower(int dummy) { }
     24  1.1  cherry 
     25  1.1  cherry /*
     26  1.1  cherry  * Hardware interrupt masks
     27  1.1  cherry  */
     28  1.1  cherry #define	splbio()	splraise(IPL_BIO)
     29  1.1  cherry #define	splnet()	splraise(IPL_NET)
     30  1.1  cherry #define	spltty()	splraise(IPL_TTY)
     31  1.1  cherry #define	splaudio()	splraise(IPL_AUDIO)
     32  1.1  cherry #define	splclock()	splraise(IPL_CLOCK)
     33  1.1  cherry #define	splstatclock()	splclock()
     34  1.1  cherry #define	splserial()	splraise(IPL_SERIAL)
     35  1.1  cherry #define splipi()	splraise(IPL_IPI)
     36  1.1  cherry 
     37  1.1  cherry 
     38  1.1  cherry /*
     39  1.1  cherry  * Miscellaneous
     40  1.1  cherry  */
     41  1.1  cherry #define	splvm()		splraise(IPL_VM)
     42  1.1  cherry #define	splhigh()	splraise(IPL_HIGH)
     43  1.1  cherry #define	spl0()		spllower(IPL_NONE)
     44  1.1  cherry #define	splsched()	splraise(IPL_SCHED)
     45  1.1  cherry #define spllock() 	splhigh()
     46  1.1  cherry #define	splx(x)		spllower(x)
     47  1.1  cherry 
     48  1.1  cherry /*
     49  1.1  cherry  * Software interrupt masks
     50  1.1  cherry  *
     51  1.1  cherry  * NOTE: spllowersoftclock() is used by hardclock() to lower the priority from
     52  1.1  cherry  * clock to softclock before it calls softclock().
     53  1.1  cherry  */
     54  1.1  cherry 
     55  1.1  cherry #define spllowersoftclock() spllower(IPL_SOFTCLOCK)
     56  1.1  cherry #define	splsoftclock() splraise(IPL_SOFTCLOCK)
     57  1.1  cherry #define	splsoftnet()	splraise(IPL_SOFTNET)
     58  1.1  cherry #define	splsoftserial()	splraise(IPL_SOFTSERIAL)
     59  1.1  cherry 
     60  1.1  cherry #endif /* ! _IA64_INTR_H_ */
     61