Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.6 KiB

  1. //**********************************************************************
  2. //
  3. // SYSLEVEL.H - System Synchronization Support Include File
  4. //
  5. //**********************************************************************
  6. // Author: Michael Toutonghi
  7. //
  8. // Copyright: 1993 Microsoft
  9. //
  10. // Description:
  11. //
  12. // This file provides the interface to the heirarchical critical
  13. // section support for system synchronization. For further information
  14. // see the associated .C file. This include file works both for 16 bit
  15. // and 32 bit code.
  16. //
  17. // Revision History:
  18. // 2/2/92: created (miketout)
  19. //**********************************************************************
  20. // if this is defined, we will do system heirarchical level checking
  21. #ifdef DEBUG
  22. #define SYSLEVELCHECK
  23. #endif
  24. // These are the currently supported critical section levels
  25. #define SL_LOAD 0
  26. #define SL_WIN16 1
  27. #define SL_KRN32 2
  28. #define SL_PRIVATE 3
  29. #define SL_TOTAL 4
  30. typedef DWORD SYSLVL;
  31. // This is another duplicate definition of the LCRST structure. It must be
  32. // kept in sync with the definitions in core\inc\syslvl16.*,
  33. // core\inc\object16.*, and core\win32\inc\object.*.
  34. // It exists so that modules other than krnl386 and kernel32 do not have to
  35. // include all of the various private kernel header files.
  36. #ifndef LCRST_DEFINED
  37. typedef struct _lcrst {
  38. long crst[5];
  39. #ifdef SYSLEVELCHECK
  40. SYSLVL slLevel;
  41. #endif
  42. } LCRST;
  43. typedef LCRST *LPLCRST;
  44. #endif
  45. #ifndef WOW32_EXTENSIONS
  46. #ifndef SYSLEVELCHECK
  47. #define CheckSysLevel( plcCrst )
  48. #else
  49. void __stdcall _CheckSysLevel( struct _lcrst *plcCrst );
  50. #define CheckSysLevel( plcCrst ) _CheckSysLevel( plcCrst )
  51. #endif
  52. #ifndef SYSLEVELCHECK
  53. #define ConfirmSysLevel( plcCrst )
  54. #else
  55. void __stdcall _ConfirmSysLevel( struct _lcrst *plcCrst );
  56. #define ConfirmSysLevel( plcCrst ) _ConfirmSysLevel( plcCrst )
  57. #endif
  58. #ifndef SYSLEVELCHECK
  59. #define CheckNotSysLevel( plcCrst )
  60. #else
  61. void __stdcall _CheckNotSysLevel( struct _lcrst *plcCrst );
  62. #define CheckNotSysLevel( plcCrst ) _CheckNotSysLevel( plcCrst )
  63. #endif
  64. void __stdcall _InitSysLevel( struct _lcrst *plcCrst, SYSLVL slLevel );
  65. #define InitSysLevel( plcCrst, slLevel ) _InitSysLevel( plcCrst, slLevel )
  66. void __stdcall _EnterSysLevel( struct _lcrst *plcCrst );
  67. #define EnterSysLevel( plcCrst ) _EnterSysLevel( plcCrst )
  68. void __stdcall _LeaveSysLevel( struct _lcrst *plcCrst );
  69. #define LeaveSysLevel( plcCrst ) _LeaveSysLevel( plcCrst )
  70. void KERNENTRY _EnterMustComplete( void );
  71. #define EnterMustComplete() _EnterMustComplete()
  72. void KERNENTRY _LeaveMustComplete( void );
  73. #define LeaveMustComplete() _LeaveMustComplete()
  74. #endif // ndef WOW32_EXTENSIONS