diff --git a/comm_tcp_socket_client.cpp b/comm_tcp_socket_client.cpp index 0f06cfb..b4035f1 100644 --- a/comm_tcp_socket_client.cpp +++ b/comm_tcp_socket_client.cpp @@ -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; } diff --git a/cpu.cpp b/cpu.cpp index 282f799..7712e7f 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -1687,7 +1687,7 @@ bool cpu::misc_operations(const uint16_t instr) #else std::unique_lock lck(qi_lock); - if (check_pending_interrupts() == false) + while (check_pending_interrupts() == false) qi_cv.wait(lck); #endif uint64_t end = get_us(); diff --git a/cpu.h b/cpu.h index df2d89a..5ff417c 100644 --- a/cpu.h +++ b/cpu.h @@ -149,7 +149,6 @@ class cpu void init_interrupt_queue(); void queue_interrupt(const uint8_t level, const uint8_t vector); std::map > get_queued_interrupts() const { return queued_interrupts; } - std::optional 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); diff --git a/kw11-l.cpp b/kw11-l.cpp index f044f84..8aef37d 100644 --- a/kw11-l.cpp +++ b/kw11-l.cpp @@ -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 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 lck(lf_csr_lock); +#endif uint16_t vtemp = lf_csr; if (addr & 1) {