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.

95 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. idlecomn.h
  5. Abstract:
  6. This module contains common private declarations to support idle tasks.
  7. Note that client does not stand for the users of the idle task
  8. API, but the code in the users process that implements these APIs.
  9. Author:
  10. Dave Fields (davidfie) 26-July-1998
  11. Cenk Ergan (cenke) 14-June-2000
  12. Revision History:
  13. --*/
  14. #ifndef _IDLECOMN_H_
  15. #define _IDLECOMN_H_
  16. //
  17. // This exception handler is prefered because it does not mask
  18. // exceptions that can be raised from the heap etc. during an RPC
  19. // call.
  20. //
  21. #define IT_RPC_EXCEPTION_HANDLER() \
  22. (((RpcExceptionCode() != STATUS_ACCESS_VIOLATION) && \
  23. (RpcExceptionCode() != STATUS_POSSIBLE_DEADLOCK) && \
  24. (RpcExceptionCode() != STATUS_INSTRUCTION_MISALIGNMENT) && \
  25. (RpcExceptionCode() != STATUS_DATATYPE_MISALIGNMENT) && \
  26. (RpcExceptionCode() != STATUS_PRIVILEGED_INSTRUCTION) && \
  27. (RpcExceptionCode() != STATUS_ILLEGAL_INSTRUCTION) && \
  28. (RpcExceptionCode() != STATUS_BREAKPOINT) \
  29. ) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
  30. //
  31. // Debug definitions:
  32. //
  33. #if DBG
  34. #ifndef IT_DBG
  35. #define IT_DBG
  36. #endif // !IT_DBG
  37. #endif // DBG
  38. #ifdef IT_DBG
  39. //
  40. // Define the component ID we use.
  41. //
  42. #define ITID DPFLTR_IDLETASK_ID
  43. //
  44. // Define DbgPrintEx levels.
  45. //
  46. #define ITERR DPFLTR_ERROR_LEVEL
  47. #define ITWARN DPFLTR_WARNING_LEVEL
  48. #define ITTRC DPFLTR_TRACE_LEVEL
  49. #define ITINFO DPFLTR_INFO_LEVEL
  50. #define ITCLID 4
  51. #define ITSRVD 5
  52. #define ITSRVDD 6
  53. #define ITTSTD 7
  54. #define ITSNAP 8
  55. //
  56. // This may help you determine what to set the DbgPrintEx mask.
  57. //
  58. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
  59. // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  60. // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  61. //
  62. #define IT_ASSERT(x) if (!(x)) RtlAssert(#x, __FILE__, __LINE__, NULL )
  63. #define DBGPR(x) DbgPrintEx x
  64. #else // IT_DBG
  65. #define IT_ASSERT(x)
  66. #define DBGPR(x)
  67. #endif // IT_DBG
  68. #endif // _IDLECOMN_H_