--- nono/vm/goldfish_timer.h 2026/04/29 17:05:33 1.1.1.3 +++ nono/vm/goldfish_timer.h 2026/04/29 17:06:00 1.1.1.5 @@ -9,7 +9,6 @@ // #include "device.h" -#include "event.h" class GFRTCDevice; class InterruptDevice; @@ -34,10 +33,10 @@ class GFTimerDevice : public IODevice busdata PeekPort(uint32 offset); private: - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); - void CallbackVT(Event& ev); - void CallbackRT(Event& ev); + void CallbackVT(Event *); + void CallbackRT(Event *); void ChangeInterrupt(); // アラーム開始。 @@ -47,13 +46,13 @@ class GFTimerDevice : public IODevice uint64 Now() const; // TIMER レジスタ読み出し値。(アラームの基準点としても使う) - uint64 elapsed {}; + union64 elapsed {}; // アラーム予定時刻 (0 ならアラームなし) - uint64 alarm {}; + union64 alarm {}; // 先に書き込まれた上位側を一旦保持しておくところ。 - uint64 alarm_high {}; + uint32 alarm_high {}; bool sync_rt {}; @@ -64,7 +63,7 @@ class GFTimerDevice : public IODevice bool intr_enable {}; // 割り込み許可 bool intr_assert {}; // 割り込み発生 - Event event { this }; + Event *event {}; Monitor *monitor {}; @@ -73,6 +72,6 @@ class GFTimerDevice : public IODevice Syncer *syncer {}; }; -static inline GFTimerDevice *GetGFTimerDevice() { +inline GFTimerDevice *GetGFTimerDevice() { return Object::GetObject(OBJ_GFTIMER); }