using System;
using System.Runtime.InteropServices;
namespace System.Threading
{
/// Defines the lock that implements single-writer/multiple-reader semantics. This is a value type.
/// 2
// Token: 0x02000612 RID: 1554
[ComVisible(true)]
public struct LockCookie
{
// Token: 0x060038CC RID: 14540 RVA: 0x000C42BC File Offset: 0x000C24BC
internal LockCookie(int thread_id)
{
this.ThreadId = thread_id;
this.ReaderLocks = 0;
this.WriterLocks = 0;
}
// Token: 0x060038CD RID: 14541 RVA: 0x000C42D4 File Offset: 0x000C24D4
internal LockCookie(int thread_id, int reader_locks, int writer_locks)
{
this.ThreadId = thread_id;
this.ReaderLocks = reader_locks;
this.WriterLocks = writer_locks;
}
/// Returns the hash code for this instance.
/// A 32-bit signed integer hash code.
// Token: 0x060038CE RID: 14542 RVA: 0x000C42EC File Offset: 0x000C24EC
public override int GetHashCode()
{
return base.GetHashCode();
}
/// Indicates whether the current instance is equal to the specified .
/// true if is equal to the value of the current instance; otherwise, false.
/// The to compare to the current instance.
// Token: 0x060038CF RID: 14543 RVA: 0x000C4300 File Offset: 0x000C2500
public bool Equals(LockCookie obj)
{
return this.ThreadId == obj.ThreadId && this.ReaderLocks == obj.ReaderLocks && this.WriterLocks == obj.WriterLocks;
}
/// Indicates whether a specified object is a and is equal to the current instance.
/// true if the value of is equal to the value of the current instance; otherwise, false.
/// The object to compare to the current instance.
// Token: 0x060038D0 RID: 14544 RVA: 0x000C433C File Offset: 0x000C253C
public override bool Equals(object obj)
{
return obj is LockCookie && obj.Equals(this);
}
/// Indicates whether two structures are equal.
/// true if is equal to ; otherwise, false.
/// The to compare to .
/// The to compare to .
// Token: 0x060038D1 RID: 14545 RVA: 0x000C435C File Offset: 0x000C255C
public static bool operator ==(LockCookie a, LockCookie b)
{
return a.Equals(b);
}
/// Indicates whether two structures are not equal.
/// true if is not equal to ; otherwise, false.
/// The to compare to .
/// The to compare to .
// Token: 0x060038D2 RID: 14546 RVA: 0x000C4368 File Offset: 0x000C2568
public static bool operator !=(LockCookie a, LockCookie b)
{
return !a.Equals(b);
}
// Token: 0x040016EC RID: 5868
internal int ThreadId;
// Token: 0x040016ED RID: 5869
internal int ReaderLocks;
// Token: 0x040016EE RID: 5870
internal int WriterLocks;
}
}