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.

95 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. raise.c
  5. Abstract:
  6. This module implements routines to raise datatype misalignment and
  7. access violation for probe code.
  8. N.B. These routines are provided as function to save space in the
  9. probe macros.
  10. N.B. Since these routines are *only* called from the probe macros,
  11. it is assumed that the calling code is pageable.
  12. Author:
  13. David N. Cutler (davec) 29-Apr-1995
  14. Environment:
  15. Kernel mode.
  16. Revision History:
  17. --*/
  18. #include "exp.h"
  19. //
  20. // Define function sections.
  21. //
  22. #ifdef ALLOC_PRAGMA
  23. #pragma alloc_text(PAGE, ExRaiseAccessViolation)
  24. #pragma alloc_text(PAGE, ExRaiseDatatypeMisalignment)
  25. #endif
  26. VOID
  27. ExRaiseAccessViolation (
  28. VOID
  29. )
  30. /*++
  31. Routine Description:
  32. This function raises an access violation exception.
  33. Arguments:
  34. None.
  35. Return Value:
  36. None.
  37. --*/
  38. {
  39. ExRaiseStatus(STATUS_ACCESS_VIOLATION);
  40. return;
  41. }
  42. VOID
  43. ExRaiseDatatypeMisalignment (
  44. VOID
  45. )
  46. /*++
  47. Routine Description:
  48. This function raises a datatype misalignment exception.
  49. Arguments:
  50. None.
  51. Return Value:
  52. None.
  53. --*/
  54. {
  55. ExRaiseStatus(STATUS_DATATYPE_MISALIGNMENT);
  56. return;
  57. }