From 7634773cf10727a34839b593fdedb0ed4b132abd Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 18 Oct 2025 14:32:39 -0400 Subject: [PATCH] serialqueue: Move definition of transmit_requests in serialqueue Move the definition of the struct so that it is more clear that it has its own locking. Signed-off-by: Kevin O'Connor --- klippy/chelper/serialqueue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/klippy/chelper/serialqueue.c b/klippy/chelper/serialqueue.c index 0bdda0d01..2c941d4c8 100644 --- a/klippy/chelper/serialqueue.c +++ b/klippy/chelper/serialqueue.c @@ -61,11 +61,12 @@ struct serialqueue { uint8_t input_buf[4096]; uint8_t need_sync; int input_pos; + // Multi-threaded support for pushing and pulling messages + struct receiver receiver; + struct transmit_requests transmit_requests; // Threading char name[16]; pthread_t tid; - // SerialHDL reader - struct receiver receiver; pthread_mutex_t lock; // protects variables below // Baud / clock tracking int receive_window; @@ -78,7 +79,6 @@ struct serialqueue { struct list_head sent_queue; double srtt, rttvar, rto; // Pending transmission message queues - struct transmit_requests transmit_requests; struct list_head ready_queues; int ready_bytes, need_ack_bytes, last_ack_bytes; struct list_head notify_queue;