home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextDeveloper / Headers / kernserv / hppa / spl.h next >
Encoding:
C/C++ Source or Header  |  1995-02-15  |  1.8 KB  |  87 lines

  1. /*
  2.  *    File:    spl.h
  3.  *    Author:    Avadis Tevanian, Jr.
  4.  *
  5.  *    Define inline macros for spl routines.
  6.  *    
  7.  * HISTORY
  8.  * 21-May-91  Gregg Kellogg (gk) at NeXT
  9.  *    Moved public portion to exported directory.
  10.  *
  11.  * 14-May-90  Gregg Kellogg (gk) at NeXT
  12.  *    Changed SPLCLOCK from 6 to 3, as much scheduling code expects
  13.  *    splclock() == splsched().  Added splusclock().
  14.  *
  15.  * 19-Jun-89  Mike DeMoney (mike) at NeXT
  16.  *    Modified to allow spl assertions in spl_measured.h
  17.  */
  18.  
  19. /*
  20.  *    SPL definitions
  21.  */
  22.  
  23. #ifndef    _KERNSERV_HPPA_SPL_H_
  24. #define    _KERNSERV_HPPA_SPL_H_
  25.  
  26.  
  27.  
  28. /* Defines for intrtab style */
  29. /* defines for style */
  30. #define     BSD_INTR_STYLE    1            /* BSD style driver connection */
  31. #define        DKIT_INTR_STYLE    2            /* Driverkit style interrupt */
  32. #define        EISA_INTR_STYLE    4            /* EISA interrutp nums */
  33. #define        SECONDLASI_INTR_STYLE    8    /* second lasi intr numbers */
  34.  
  35. /*
  36.  * spl routines 
  37.  */
  38.  
  39.  
  40. #ifndef ASSEMBLER
  41. extern int splx(int    spl);
  42. #endif ASSEMBLER
  43.  
  44. #define splusclock()    splhigh()
  45. #define spldma()        splhigh()
  46. #define splsched()        splhigh()
  47. #define splclock()        splhigh()
  48.  
  49. #define spldev()        splbio()
  50. #define splvm()            splbio()
  51. #define splscc()        splbio()
  52. #define splimp()        splbio()
  53. #define splnet()        splbio()
  54. #define spltty()        splbio()
  55. #define spln(x)            splx(x)
  56.  
  57. #define splsoftclock    spl0()
  58.  
  59. /*
  60.  * the following IPL* are used with curipl(), which returns the current SPL
  61.  * level. 
  62.  */
  63.  
  64. #ifndef ASSEMBLER
  65. extern int curipl(void);
  66. extern unsigned int ipltospl(unsigned int ipl);
  67. #endif
  68.  
  69. #define IPLHIGH         7
  70.  
  71. #define IPLUSCLOCK      6
  72. #define IPLSCHED        6
  73. #define IPLCLOCK        6
  74. #define IPLDMA          6
  75.  
  76. #define IPLSCC          3
  77. #define IPLBIO          3
  78. #define IPLIMP          3
  79. #define IPLVM           3
  80. #define IPLNET          3
  81. #define IPLDEVICE        3
  82. #define IPLTTY          3
  83.  
  84. #define IPLSOFTCLOCK    0    // IPL0
  85.  
  86. #endif    _KERNSERV_HPPA_SPL_H_
  87.