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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-10-18 14:32:39 -04:00
parent 46af133613
commit 7634773cf1

View File

@@ -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;