mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-12-16 05:09:56 +01:00
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:
@@ -61,11 +61,12 @@ struct serialqueue {
|
|||||||
uint8_t input_buf[4096];
|
uint8_t input_buf[4096];
|
||||||
uint8_t need_sync;
|
uint8_t need_sync;
|
||||||
int input_pos;
|
int input_pos;
|
||||||
|
// Multi-threaded support for pushing and pulling messages
|
||||||
|
struct receiver receiver;
|
||||||
|
struct transmit_requests transmit_requests;
|
||||||
// Threading
|
// Threading
|
||||||
char name[16];
|
char name[16];
|
||||||
pthread_t tid;
|
pthread_t tid;
|
||||||
// SerialHDL reader
|
|
||||||
struct receiver receiver;
|
|
||||||
pthread_mutex_t lock; // protects variables below
|
pthread_mutex_t lock; // protects variables below
|
||||||
// Baud / clock tracking
|
// Baud / clock tracking
|
||||||
int receive_window;
|
int receive_window;
|
||||||
@@ -78,7 +79,6 @@ struct serialqueue {
|
|||||||
struct list_head sent_queue;
|
struct list_head sent_queue;
|
||||||
double srtt, rttvar, rto;
|
double srtt, rttvar, rto;
|
||||||
// Pending transmission message queues
|
// Pending transmission message queues
|
||||||
struct transmit_requests transmit_requests;
|
|
||||||
struct list_head ready_queues;
|
struct list_head ready_queues;
|
||||||
int ready_bytes, need_ack_bytes, last_ack_bytes;
|
int ready_bytes, need_ack_bytes, last_ack_bytes;
|
||||||
struct list_head notify_queue;
|
struct list_head notify_queue;
|
||||||
|
|||||||
Reference in New Issue
Block a user