Initial commit. Project, simple monitoring of CPU temp via "sensors" command
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Barsik
|
||||
{
|
||||
class RegistersContainer
|
||||
{
|
||||
private Dictionary<int, int> registers;
|
||||
|
||||
public RegistersContainer()
|
||||
{
|
||||
registers = new Dictionary<int, int>();
|
||||
}
|
||||
|
||||
public int this[int address]
|
||||
{
|
||||
get
|
||||
{
|
||||
lock(registers)
|
||||
{
|
||||
if (registers.ContainsKey(address)) return registers[address];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
lock (registers)
|
||||
{
|
||||
registers[address] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user