interrupt scheduling debugging

This commit is contained in:
folkert van heusden 2024-04-21 22:48:52 +02:00
parent 2216589a3f
commit 86a788fd3f
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
3 changed files with 4 additions and 1 deletions

View file

@ -392,7 +392,7 @@ bool cpu::execute_any_pending_interrupt()
if (interrupts->second.empty() == false) {
any_queued_interrupts = true;
if (i < start_level)
if (i < start_level) // at leas we know now that there's an interrupt scheduled
continue;
if (can_trigger == false) {

1
cpu.h
View file

@ -141,6 +141,7 @@ public:
void queue_interrupt(const uint8_t level, const uint8_t vector);
std::map<uint8_t, std::set<uint8_t> > get_queued_interrupts() const { return queued_interrupts; }
std::optional<int> get_interrupt_delay_left() const { return trap_delay; }
bool check_if_interrupts_pending() const { return any_queued_interrupts; }
void trap(uint16_t vector, const int new_ipl = -1, const bool is_interrupt = false);
bool is_it_a_trap() const { return it_is_a_trap; }

View file

@ -726,6 +726,8 @@ void show_queued_interrupts(console *const cnsl, cpu *const c)
else
cnsl->put_string_lf("No delay");
cnsl->put_string_lf(format("Interrupt pending flag: %d", c->check_if_interrupts_pending()));
auto queued_interrupts = c->get_queued_interrupts();
for(auto & level: queued_interrupts) {