LockCookie.cs 584 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // System.Threading.LockCookie.cs
  3. //
  4. // Author:
  5. // Dick Porter ([email protected])
  6. //
  7. // (C) Ximian, Inc. http://www.ximian.com
  8. //
  9. namespace System.Threading
  10. {
  11. [Serializable]
  12. public struct LockCookie
  13. {
  14. internal int ThreadId;
  15. internal int ReaderLocks;
  16. internal int WriterLocks;
  17. internal LockCookie (int thread_id)
  18. {
  19. ThreadId = thread_id;
  20. ReaderLocks = 0;
  21. WriterLocks = 0;
  22. }
  23. internal LockCookie (int thread_id, int reader_locks, int writer_locks)
  24. {
  25. ThreadId = thread_id;
  26. ReaderLocks = reader_locks;
  27. WriterLocks = writer_locks;
  28. }
  29. }
  30. }