Skip to content

Commit

Permalink
Merge branch 'master' of ssh://172.29.0.8/home/folkert/git/PDP-11
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Jun 26, 2024
2 parents b6f84ce + 5e2c8a7 commit 5bc0593
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion comm_tcp_socket_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class cpu
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);
Expand Down
10 changes: 10 additions & 0 deletions kw11-l.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5bc0593

Please sign in to comment.