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.

85 lines
3.3 KiB

  1. /***
  2. *ehstate.h - exception handling state management declarations
  3. *
  4. * Copyright (c) 1993-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * EH State management declarations. Does target-dependent definitions.
  8. *
  9. * Macros defined:
  10. *
  11. * GetCurrentState - determines current state (may call function)
  12. * SetState - sets current state to specified value (may call function)
  13. *
  14. * [Internal]
  15. *
  16. *Revision History:
  17. * 05-21-93 BS Module created.
  18. * 03-03-94 TL Added Mips (_M_MRX000 >= 4000) changes
  19. * 09-02-94 SKS This header file added.
  20. * 09-13-94 GJF Merged in changes from/for DEC Alpha (from Al Doser,
  21. * dated 6/20).
  22. * 12-15-94 XY merged with mac header
  23. * 02-14-95 CFW Clean up Mac merge.
  24. * 03-29-95 CFW Add error message to internal headers.
  25. * 12-14-95 JWM Add "#pragma once".
  26. * 02-24-97 GJF Detab-ed.
  27. * 06-01-97 TL Added P7 changes
  28. * 05-17-99 PML Remove all Macintosh support.
  29. * 06-05-01 GB AMD64 Eh support Added.
  30. * 06-13-01 GB Rewrite of C++Eh for IA64 and AMD64
  31. * 07-15-01 PML Remove all ALPHA, MIPS, and PPC code
  32. *
  33. ****/
  34. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  35. #pragma once
  36. #endif
  37. #ifndef _INC_EHSTATE
  38. #define _INC_EHSTATE
  39. #ifndef _CRTBLD
  40. /*
  41. * This is an internal C runtime header file. It is used when building
  42. * the C runtimes only. It is not to be used as a public header file.
  43. */
  44. #error ERROR: Use of C runtime library internal header file.
  45. #endif /* _CRTBLD */
  46. #if defined(_M_AMD64) /*IFSTRIP=IGN*/
  47. extern __ehstate_t __GetCurrentState(EHRegistrationNode*, DispatcherContext*, FuncInfo*);
  48. extern __ehstate_t __GetUnwindState(EHRegistrationNode*, DispatcherContext*, FuncInfo*);
  49. extern VOID __SetState(EHRegistrationNode*, DispatcherContext*, FuncInfo*, __ehstate_t);
  50. extern VOID __SetUnwindTryBlock(EHRegistrationNode*, DispatcherContext*, FuncInfo*, INT);
  51. extern INT __GetUnwindTryBlock(EHRegistrationNode*, DispatcherContext*, FuncInfo*);
  52. extern __ehstate_t __StateFromControlPc(FuncInfo*, DispatcherContext*);
  53. extern __ehstate_t __StateFromIp(FuncInfo*, DispatcherContext*, __int64);
  54. #elif defined(_M_IA64) /*IFSTRIP=IGN*/
  55. extern __ehstate_t __GetCurrentState(EHRegistrationNode*, DispatcherContext*, FuncInfo*);
  56. extern __ehstate_t __GetUnwindState(EHRegistrationNode*, DispatcherContext*, FuncInfo*);
  57. extern VOID __SetState(EHRegistrationNode*, DispatcherContext*, FuncInfo*, __ehstate_t);
  58. extern VOID __SetUnwindTryBlock(EHRegistrationNode*, DispatcherContext*, FuncInfo*, INT);
  59. extern INT __GetUnwindTryBlock(EHRegistrationNode*, DispatcherContext*, FuncInfo*);
  60. extern __ehstate_t __StateFromControlPc(FuncInfo*, DispatcherContext*);
  61. extern __ehstate_t __StateFromIp(FuncInfo*, DispatcherContext*, __int64);
  62. #elif _M_IX86 >= 300 /*IFSTRIP=IGN*/
  63. //
  64. // In the initial implementation, the state is simply stored in the
  65. // registration node.
  66. //
  67. #define GetCurrentState( pRN, pDC, pFuncInfo ) (pRN->state)
  68. #define SetState( pRN, pDC, pFuncInfo, newState ) (pRN->state = newState)
  69. #else
  70. #error "State management unknown for this platform "
  71. #endif
  72. #endif /* _INC_EHSTATE */