Merge branch 'master' of ssh://172.29.0.8/home/folkert/git/PDP-11

This commit is contained in:
folkert van heusden 2024-06-26 20:57:13 +02:00
commit 5bc05930d3
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
4 changed files with 11 additions and 3 deletions

View file

@ -157,7 +157,6 @@ void comm_tcp_socket_client::operator()()
DOLOG(ll_error, true, "comm_tcp_socket_client: cannot resolve \"%s\":%s: %s", host.c_str(), port_str, gai_strerror(rc));
#endif
myusleep(101000l);
continue;
}

View file

@ -1687,7 +1687,7 @@ bool cpu::misc_operations(const uint16_t instr)
#else
std::unique_lock<std::mutex> lck(qi_lock);
if (check_pending_interrupts() == false)
while (check_pending_interrupts() == false)
qi_cv.wait(lck);
#endif
uint64_t end = get_us();

1
cpu.h
View file

@ -149,7 +149,6 @@ public:
void init_interrupt_queue();
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);

View file

@ -67,6 +67,11 @@ void kw11_l::begin(console *const cnsl)
void kw11_l::reset()
{
#if defined(BUILD_FOR_RP2040)
xSemaphoreTake(lf_csr_lock, portMAX_DELAY);
#else
std::unique_lock<std::mutex> lck(lf_csr_lock);
#endif
lf_csr = 0;
}
@ -181,6 +186,11 @@ void kw11_l::write_byte(const uint16_t addr, const uint8_t value)
return;
}
#if defined(BUILD_FOR_RP2040)
xSemaphoreTake(lf_csr_lock, portMAX_DELAY);
#else
std::unique_lock<std::mutex> lck(lf_csr_lock);
#endif
uint16_t vtemp = lf_csr;
if (addr & 1) {