Home | History | Annotate | Line # | Download | only in include
psl.h revision 1.17
      1 /*	$NetBSD: psl.h,v 1.17 2001/04/13 23:29:57 thorpej Exp $	*/
      2 
      3 #ifndef _MACHINE_PSL_H_
      4 #define _MACHINE_PSL_H_
      5 
      6 #include <m68k/psl.h>
      7 
      8 #if defined(_KERNEL) && !defined(_LOCORE)
      9 
     10 #define	spl0()			_spl0()	/* we have real software interrupts */
     11 
     12 #define splnone()		spl0()
     13 #define	spllowersoftclock()	spl1()
     14 
     15 #define splsoftclock()		splraise1()
     16 #define splsoftnet()		splraise1()
     17 #define splbio()		splraise3()
     18 #define splnet()		splraise3()
     19 
     20 /*
     21  * splserial hack, idea by Jason Thorpe.
     22  * drivers which need it (at the present only the coms) raise the variable to
     23  * their serial interrupt level.
     24  *
     25  * serialspl is statically initialized in machdep.c at the moment; should
     26  * be some driver independent file.
     27  *
     28  * XXX should serialspl be volatile? I think not; it is intended to be set only
     29  * during xxx_attach() time, and will be used only later.
     30  *	-is
     31  */
     32 
     33 extern u_int16_t	amiga_serialspl;
     34 #define splserial()	_splraise(amiga_serialspl)
     35 #define spltty()	splraise4()
     36 #define	splvm()		splraise4()
     37 
     38 #ifndef LEV6_DEFER
     39 #define splclock()	splraise6()
     40 #define splstatclock()	splraise6()
     41 #define splhigh()	spl7()
     42 #define splsched()	spl7()
     43 #define spllock()	spl7()
     44 #else
     45 #define splclock()	splraise4()
     46 #define splstatclock()	splraise4()
     47 #define splhigh()	splraise4()
     48 #define splsched()	splraise4()
     49 #define spllock()	splraise4()
     50 #endif
     51 
     52 #define splx(s)		_spl(s)
     53 
     54 #endif	/* KERNEL && !_LOCORE */
     55 #endif	/* _MACHINE_PSL_H_ */
     56