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.

78 lines
2.8 KiB

  1. #ifndef __BATCHINF_H__
  2. #define __BATCHINF_H__
  3. #define GLMSG_ALIGN(x) ((ULONG)((((ULONG_PTR)(x))+7)&-8))
  4. #define GLMSG_ALIGNPTR(x) ((((ULONG_PTR)(x))+7)&-8)
  5. #define GLMSGBATCHSTATS_CLEAR 0 // Clear values
  6. #define GLMSGBATCHSTATS_GETSTATS 1 // Return values
  7. typedef struct {
  8. ULONG ServerTrips; // Number of times the server was called
  9. ULONG ClientCalls; // Total number of client calls
  10. ULONG ServerCalls; // Total number of server calls
  11. } GLMSGBATCHSTATS;
  12. /*
  13. * GLMSGBATCHINFO is the first structure in the shared section
  14. *
  15. */
  16. typedef struct _GLMSGBATCHINFO {
  17. ULONG MaximumOffset; // Threshold for flushing.
  18. ULONG FirstOffset; // Where to put the first message
  19. ULONG NextOffset; // Where to place the next message
  20. ULONG ReturnValue; // Value returned from the server
  21. #ifdef DOGLMSGBATCHSTATS
  22. GLMSGBATCHSTATS BatchStats;
  23. #endif /* DOGLMSGBATCHSTATS */
  24. } GLMSGBATCHINFO;
  25. #if DBG
  26. #ifdef DODBGPRINTSTRUCT
  27. #define PRINT_GLMSGBATCHINFO(Text, pMsgBatchInfo) \
  28. { \
  29. DbgPrint("%s (%d): %s:\n", __FILE__, __LINE__, Text); \
  30. if (NULL == pMsgBatchInfo) \
  31. { \
  32. DbgPrint("Cannot print pMsgBatchInfo == NULL\n"); \
  33. } \
  34. else \
  35. { \
  36. DbgPrint("pMsgBatchInfo: 0x%08lX\n", \
  37. pMsgBatchInfo ); \
  38. DbgPrint("MaximumOffset.....0x%08lX\n", \
  39. pMsgBatchInfo->MaximumOffset ); \
  40. DbgPrint("FirstOffset 0x%08lX\n", \
  41. pMsgBatchInfo->FirstOffset ); \
  42. DbgPrint("NextOffset........0x%08lX\n", \
  43. pMsgBatchInfo->NextOffset ); \
  44. DbgPrint("\n"); \
  45. } \
  46. }
  47. #else /* DOPRINT */
  48. #define PRINT_GLMSGBATCHINFO(Text, pMsgBatchInfo)
  49. #endif /* DOPRINT */
  50. #else /* DBG */
  51. #define PRINT_GLMSGBATCHINFO(Text, pMsgBatchInfo)
  52. #endif /* DBG */
  53. #endif /* __BATCHINF_H__ */