Leaked source code of windows server 2003
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.

123 lines
2.6 KiB

  1. ;++
  2. ;
  3. ; Copyright (c) 1989 Microsoft Corporation
  4. ;
  5. ; Module Name:
  6. ;
  7. ; services.nap
  8. ;
  9. ; Abstract:
  10. ;
  11. ; This module implements the system service dispatch stub procedures.
  12. ; It also creates a "profile" of each service by counting and
  13. ; timing calls.
  14. ;
  15. ; Author:
  16. ;
  17. ; Shie-Lin Tzong (shielint) 6-Feb-1990
  18. ; Russ Blake (russbl) 22-Apr-1991
  19. ;
  20. ; Environment:
  21. ;
  22. ; User or kernel mode.
  23. ;
  24. ; Revision History:
  25. ;
  26. ;--
  27. include ks386.inc
  28. .386
  29. STUBS_BEGIN1 macro t
  30. TITLE t
  31. endm
  32. STUBS_BEGIN2 macro t
  33. endm
  34. STUBS_BEGIN3 macro t
  35. _TEXT SEGMENT DWORD USE32 PUBLIC 'CODE'
  36. endm
  37. STUBS_BEGIN4 macro t
  38. ASSUME CS:FLAT
  39. endm
  40. STUBS_BEGIN5 macro t
  41. align 4
  42. endm
  43. STUBS_BEGIN6 macro t
  44. endm
  45. STUBS_BEGIN7 macro t
  46. endm
  47. STUBS_BEGIN8 macro t
  48. endm
  49. STUBS_END macro t
  50. _TEXT ENDS
  51. end
  52. endm
  53. SYSSTUBS_ENTRY1 macro ServiceNumber, Name
  54. public _Zw&Name
  55. _Zw&Name proc near
  56. mov eax, ServiceNumber ; (eax) = service number
  57. lea edx, [esp]+4 ; (edx) -> arguments
  58. INT 2Eh ; invoke system service
  59. ret
  60. _Zw&Name endp
  61. endm
  62. SYSSTUBS_ENTRY2 macro ServiceNumber, Name
  63. endm
  64. SYSSTUBS_ENTRY3 macro ServiceNumber, Name
  65. endm
  66. SYSSTUBS_ENTRY4 macro ServiceNumber, Name
  67. endm
  68. SYSSTUBS_ENTRY5 macro ServiceNumber, Name
  69. endm
  70. SYSSTUBS_ENTRY6 macro ServiceNumber, Name
  71. endm
  72. SYSSTUBS_ENTRY7 macro ServiceNumber, Name
  73. endm
  74. SYSSTUBS_ENTRY8 macro ServiceNumber, Name
  75. endm
  76. USRSTUBS_ENTRY1 macro ServiceNumber, Name
  77. public _Zw&Name, _Nt&Name
  78. _Zw&Name proc near
  79. _Nt&Name proc near
  80. mov eax, ServiceNumber ; (eax) = service number
  81. lea edx, [esp]+4 ; (edx) -> arguments
  82. call _NapProfileDispatch ; invoke profiled system service
  83. ret
  84. _Nt&Name endp
  85. _Zw&Name endp
  86. endm
  87. USRSTUBS_ENTRY2 macro ServiceNumber, Name
  88. endm
  89. USRSTUBS_ENTRY3 macro ServiceNumber, Name
  90. endm
  91. USRSTUBS_ENTRY4 macro ServiceNumber, Name
  92. endm
  93. USRSTUBS_ENTRY5 macro ServiceNumber, Name
  94. endm
  95. USRSTUBS_ENTRY6 macro ServiceNumber, Name
  96. endm
  97. USRSTUBS_ENTRY7 macro ServiceNumber, Name
  98. endm
  99. USRSTUBS_ENTRY8 macro ServiceNumber, Name
  100. endm
  101. STUBS_BEGIN1 <"System Service Stub Procedures">
  102. STUBS_BEGIN2 <"System Service Stub Procedures">
  103. STUBS_BEGIN3 <"System Service Stub Procedures">
  104. STUBS_BEGIN4 <"System Service Stub Procedures">
  105. STUBS_BEGIN5 <"System Service Stub Procedures">
  106. STUBS_BEGIN6 <"System Service Stub Procedures">
  107. STUBS_BEGIN7 <"System Service Stub Procedures">
  108. STUBS_BEGIN8 <"System Service Stub Procedures">
  109. EXTRN _NapProfileDispatch:NEAR