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.

72 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. mrsw.h
  5. Abstract:
  6. This is the include file for the multiple reader single writer
  7. syncronization.
  8. Author:
  9. Dave Hastings (daveh) creation-date 26-Jul-1995
  10. Revision History:
  11. --*/
  12. #ifndef _MRSW_H_
  13. #define _MRSW_H_
  14. typedef union {
  15. DWORD Counters;
  16. struct {
  17. DWORD WriterCount : 16;
  18. DWORD ReaderCount : 16;
  19. };
  20. } MRSWCOUNTERS, *PMRSWCOUNTERS;
  21. typedef struct _MrswObject {
  22. MRSWCOUNTERS Counters;
  23. HANDLE WriterEvent;
  24. HANDLE ReaderEvent;
  25. #if DBG
  26. DWORD WriterThreadId;
  27. #endif
  28. } MRSWOBJECT, *PMRSWOBJECT;
  29. BOOL
  30. MrswInitializeObject(
  31. PMRSWOBJECT Mrsw
  32. );
  33. VOID
  34. MrswWriterEnter(
  35. PMRSWOBJECT Mrsw
  36. );
  37. VOID
  38. MrswWriterExit(
  39. PMRSWOBJECT Mrsw
  40. );
  41. VOID
  42. MrswReaderEnter(
  43. PMRSWOBJECT Mrsw
  44. );
  45. VOID
  46. MrswReaderExit(
  47. PMRSWOBJECT Mrsw
  48. );
  49. extern MRSWOBJECT MrswEP; // Entrypoint MRSW synchronization object
  50. extern MRSWOBJECT MrswTC; // Translation cache MRSW synchronization object
  51. extern MRSWOBJECT MrswIndirTable; // Indirect Control Transfer Table synchronization object
  52. #endif