* Update WindowsEmbeddedControllerIO.cs * Update WindowsEmbeddedControllerIO.cs
This commit is contained in:
@@ -23,7 +23,7 @@ namespace LibreHardwareMonitor.Hardware.Motherboard.Lpc.EC
|
||||
|
||||
// implementation
|
||||
private const int WaitSpins = 50;
|
||||
private bool _disposedValue;
|
||||
private bool _disposed;
|
||||
|
||||
private int _waitReadFailures;
|
||||
|
||||
@@ -33,13 +33,6 @@ namespace LibreHardwareMonitor.Hardware.Motherboard.Lpc.EC
|
||||
{
|
||||
throw new BusMutexLockingFailedException();
|
||||
}
|
||||
|
||||
_disposedValue = false;
|
||||
}
|
||||
|
||||
~WindowsEmbeddedControllerIO()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
public byte ReadByte(byte register)
|
||||
@@ -67,19 +60,13 @@ namespace LibreHardwareMonitor.Hardware.Motherboard.Lpc.EC
|
||||
WriteLoop(register, value, WriteWordOp);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!_disposedValue)
|
||||
{
|
||||
Ring0.ReleaseIsaBusMutex();
|
||||
_disposedValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
if (!_disposed)
|
||||
{
|
||||
_disposed = true;
|
||||
Ring0.ReleaseIsaBusMutex();
|
||||
}
|
||||
}
|
||||
|
||||
private TResult ReadLoop<TResult>(byte register, ReadOp<TResult> op) where TResult : new()
|
||||
|
||||
Reference in New Issue
Block a user