gdbstub: Work around Win32 threading behavior

This commit is contained in:
RichardG867
2024-08-22 14:21:36 -03:00
parent a7cff71892
commit 8d88d187b2

View File

@@ -1513,6 +1513,7 @@ gdbstub_client_thread(void *priv)
case '$': /* packet start */
/* Wait for any existing packets to be processed. */
thread_wait_event(client->processed_event, -1);
thread_set_event(client->processed_event);
client->packet_pos = 0;
break;
@@ -1539,6 +1540,7 @@ gdbstub_client_thread(void *priv)
default:
/* Wait for any existing packets to be processed, just in case. */
thread_wait_event(client->processed_event, -1);
thread_set_event(client->processed_event);
if (client->packet_pos < (sizeof(client->packet) - 1)) {
/* Append byte to the packet. */