Fix KelvinCPU Set/Get Register API
Match upstream API change https://github.com/renode/renode-infrastructure/commit/c8ed56a
Bypass-Presubmit-Reason: Sencha CI needs extra fix
Change-Id: Iae8ac63abf63ad1ab309df921f1a3533858739ed
diff --git a/shodan_infrastructure/KelvinCPU.cs b/shodan_infrastructure/KelvinCPU.cs
index 3013992..81c2f32 100644
--- a/shodan_infrastructure/KelvinCPU.cs
+++ b/shodan_infrastructure/KelvinCPU.cs
@@ -288,7 +288,7 @@
}
// ICPUWithRegisters methods implementations.
- public void SetRegisterUnsafe(int register, RegisterValue value)
+ public void SetRegister(int register, RegisterValue value)
{
lock(nativeLock)
{
@@ -300,7 +300,7 @@
}
}
- public RegisterValue GetRegisterUnsafe(int register)
+ public RegisterValue GetRegister(int register)
{
Int64 value = 0;
lock(nativeLock)
@@ -315,6 +315,22 @@
return (UInt64)value;
}
+ public void SetRegisterUnsafe(int register, RegisterValue value)
+ {
+ // This is obsolete API, left here only for compatibility
+ this.Log(LogLevel.Warning, "Using `SetRegisterUnsafe` API is " +
+ "obsolete. Please change to `SetRegister`.");
+ SetRegister(register, value);
+ }
+
+ public RegisterValue GetRegisterUnsafe(int register)
+ {
+ // This is obsolete API, left here only for compatibility
+ this.Log(LogLevel.Warning, "Using `GetRegisterUnsafe` API is " +
+ "obsolete. Please change to `GetRegister`.");
+ return GetRegister(register);
+ }
+
public IEnumerable<CPURegister> GetRegisters()
{
if (registerMap.Count == 0)