|
|
| version 1.5.2.1, 2026/02/11 13:33:22 | version 1.6.2.1, 2026/02/13 17:09:32 |
|---|---|
| Line 62 typedef struct { | Line 62 typedef struct { |
| int lrb_size; | int lrb_size; |
| unsigned char *lrb_data; | unsigned char *lrb_data; |
| } lrbuf_t; | } lrbuf_t; |
| #define lrb_head(x) atomic_load_explicit((atomic_int*) &(x)->lrb_head, memory_order_relaxed) | |
| #define lrb_tail(x) atomic_load_explicit((atomic_int*) &(x)->lrb_tail, memory_order_relaxed) | |
| #define lrb_size(x) ((x)->lrb_size) | |
| #define lrb_getb(x) ((x)->lrb_data) | |
| #define lrb_hptr(x) ((x)->lrb_data + lrb_head((x))) | |
| #define lrb_tptr(x) ((x)->lrb_data + lrb_tail((x))) | |
| #define lrb_isrewind(x) (lrb_head((x)) < lrb_tail((x))) | |
| #define lrb_queued(x, r) do { \ | #define lrb_queued(x, r) do { \ |
| u_int _h, _t; \ | u_int _h, _t; \ |
| _t = atomic_load_explicit((atomic_int*) &(x)->lrb_tail, memory_order_acquire); \ | _t = atomic_load_explicit((atomic_int*) &(x)->lrb_tail, memory_order_acquire); \ |