cachetimestampsdevelopetsiliverc-4.0.4ringdecrementfixringperformance
Last change
on this file since bd51874 was
bd51874,
checked in by Shane Alcock <salcock@…>, 3 years ago
|
Add simple circular buffer data struct
Designed for receiving streamed octets, e.g. over TCP.
|
-
Property mode set to
100644
|
File size:
579 bytes
|
Line | |
---|
1 | #ifndef LIBTRACE_SCB_H_ |
---|
2 | #define LIBTRACE_SCB_H_ |
---|
3 | |
---|
4 | typedef struct libtracescb { |
---|
5 | uint8_t *address; |
---|
6 | uint32_t count_bytes; |
---|
7 | uint32_t write_offset; |
---|
8 | uint32_t read_offset; |
---|
9 | int fd; |
---|
10 | } libtrace_scb_t; |
---|
11 | |
---|
12 | |
---|
13 | void libtrace_scb_init(libtrace_scb_t *buf, uint32_t size, uint16_t id); |
---|
14 | void libtrace_scb_destroy(libtrace_scb_t *buf); |
---|
15 | int libtrace_scb_recv_sock(libtrace_scb_t *buf, int sock, int recvflags); |
---|
16 | uint8_t *libtrace_scb_get_read(libtrace_scb_t *buf, uint32_t *available); |
---|
17 | void libtrace_scb_advance_read(libtrace_scb_t *buf, uint32_t forward); |
---|
18 | |
---|
19 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.