protected ResourceLockDelegator(ResourceLock resLock, ResourceLockOptions resourceLockOptions)
         : base(resourceLockOptions) {
         Contract.Requires(resLock != null);
         Contract.Ensures(InnerLock != null);
         m_resLock = resLock;
#if DEADLOCK_DETECTION
         m_resLock.ImmuneFromDeadlockDetection = true;   // The outerlock is used for deadlock detection; not the inner lock
#endif
         Contract.Assert(m_resLock != null);
      }
        protected ResourceLockDelegator(ResourceLock resLock, ResourceLockOptions resourceLockOptions)
            : base(resourceLockOptions)
        {
            Contract.Requires(resLock != null);
            Contract.Ensures(InnerLock != null);
            m_resLock = resLock;
#if DEADLOCK_DETECTION
            m_resLock.ImmuneFromDeadlockDetection = true; // The outerlock is used for deadlock detection; not the inner lock
#endif
            Contract.Assert(m_resLock != null);
        }
 public ResourceLockOptionsHelper(ResourceLockOptions options) {
    m_options = options;
 }
 protected ResourceLock(ResourceLockOptions resourceLockOptions) {
    m_resourceLockOptions = resourceLockOptions;
    InitConditionalVariableSupport();
 }
 /// <summary>Constructs a ResourceLockModifier object.</summary>
 /// <param name="resLock">Identifies the inner ResourceLock object.</param>
 /// <param name="resourceLockOptions">Identifies the flags associted with the innter ResourceLock object.</param>
 protected ResourceLockModifier(ResourceLock resLock, ResourceLockOptions resourceLockOptions)
    : base(resLock, resourceLockOptions) {
       Contract.Requires(resLock != null);
 }
 public ThreadBlockInfo(Object lockObject, ResourceLockOptions lockFlags)
     : this(lockObject, 0) {
     m_lockFlags = new ResourceLockOptionsHelper(lockFlags);
 }
 // Called by a thread when it is about to wait on a lock
 private IDisposable BlockForLockI(Object lockObject, ResourceLockOptions resourceLockOptions) {
     // Create record indicating what the calling thread is waiting on and add to waiting threads list
     BlockThreadAndCheckDeadlock(new ThreadBlockInfo(lockObject, resourceLockOptions));
     return m_UnblockDueToLockAcquireDisposer;
 }
 public static IDisposable BlockForLock(Object lockObject, ResourceLockOptions resourceLockOptions) {
     return s_deadlockDetector.BlockForLockI(lockObject, resourceLockOptions);
 }
Exemple #9
0
 public ResourceLockOptionsHelper(ResourceLockOptions options)
 {
     m_options = options;
 }
Exemple #10
0
 protected ResourceLock(ResourceLockOptions resourceLockOptions)
 {
     m_resourceLockOptions = resourceLockOptions;
     InitConditionalVariableSupport();
 }
Exemple #11
0
 public ThreadBlockInfo(Object lockObject, ResourceLockOptions lockFlags)
     : this(lockObject, 0)
 {
     m_lockFlags = new ResourceLockOptionsHelper(lockFlags);
 }
Exemple #12
0
 // Called by a thread when it is about to wait on a lock
 private IDisposable BlockForLockI(Object lockObject, ResourceLockOptions resourceLockOptions)
 {
     // Create record indicating what the calling thread is waiting on and add to waiting threads list
     BlockThreadAndCheckDeadlock(new ThreadBlockInfo(lockObject, resourceLockOptions));
     return(m_UnblockDueToLockAcquireDisposer);
 }
Exemple #13
0
 public static IDisposable BlockForLock(Object lockObject, ResourceLockOptions resourceLockOptions)
 {
     return(s_deadlockDetector.BlockForLockI(lockObject, resourceLockOptions));
 }
 /// <summary>Constructs a ResourceLockModifier object.</summary>
 /// <param name="resLock">Identifies the inner ResourceLock object.</param>
 /// <param name="resourceLockOptions">Identifies the flags associted with the innter ResourceLock object.</param>
 protected ResourceLockModifier(ResourceLock resLock, ResourceLockOptions resourceLockOptions)
     : base(resLock, resourceLockOptions)
 {
     Contract.Requires(resLock != null);
 }