test: raise.c Source File

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# raise.c

Go to the documentation of this file.

    00001 /*++
    00002
    00003 Copyright (c) 1995  Microsoft Corporation
    00004
    00005 Module Name:
    00006
    00007     raise.c
    00008
    00009 Abstract:
    00010
    00011     This module implements routines to raise datatype misalignment and
    00012     access violation for probe code.
    00013
    00014     N.B. These routines are provided as function to save space in the
    00015         probe macros.
    00016
    00017     N.B. Since these routines are *only* called from the probe macros,
    00018         it is assumed that the calling code is pageable.
    00019
    00020 Author:
    00021
    00022     David N. Cutler (davec) 29-Apr-1995
    00023
    00024 Environment:
    00025
    00026     Kernel mode.
    00027
    00028 Revision History:
    00029
    00030 --*/
    00031
    00032 #include "exp.h"
    00033
    00034 //
    00035 // Define function sections.
    00036 //
    00037
    00038 #ifdef ALLOC_PRAGMA
    00039 #pragma alloc_text(PAGE, ExRaiseAccessViolation)
    00040 #pragma alloc_text(PAGE, ExRaiseDatatypeMisalignment)
    00041 #endif
    00042
    00043 VOID
    00044 ExRaiseAccessViolation (
    00045     VOID
    00046     )
    00047
    00048 /*++
    00049
    00050 Routine Description:
    00051
    00052     This function raises an access violation exception.
    00053
    00054 Arguments:
    00055
    00056     None.
    00057
    00058 Return Value:
    00059
    00060     None.
    00061
    00062 --*/
    00063
    00064 {
    00065
    00066     ExRaiseStatus(STATUS_ACCESS_VIOLATION);
    00067     return;
    00068 }
    00069
    00070 VOID
    00071 ExRaiseDatatypeMisalignment (
    00072     VOID
    00073     )
    00074
    00075 /*++
    00076
    00077 Routine Description:
    00078
    00079     This function raises a datatype misalignment exception.
    00080
    00081 Arguments:
    00082
    00083     None.
    00084
    00085 Return Value:
    00086
    00087     None.
    00088
    00089 --*/
    00090
    00091 {
    00092
    00093     ExRaiseStatus(STATUS_DATATYPE_MISALIGNMENT);
    00094     return;
    00095 }