Commit | Line | Data |
---|---|---|
0b0cd937 PMF |
1 | #ifndef USTD_H |
2 | #define USTD_H | |
3 | ||
4 | #include "ustcomm.h" | |
5 | ||
6 | struct buffer_info { | |
7 | char *name; | |
8 | pid_t pid; | |
9 | struct ustcomm_connection conn; | |
10 | ||
11 | int shmid; | |
12 | int bufstruct_shmid; | |
13 | ||
14 | /* the buffer memory */ | |
15 | void *mem; | |
16 | /* buffer size */ | |
17 | int memlen; | |
18 | /* number of subbuffers in buffer */ | |
19 | int n_subbufs; | |
20 | /* size of each subbuffer */ | |
21 | int subbuf_size; | |
22 | ||
23 | /* the buffer information struct */ | |
24 | void *bufstruct_mem; | |
25 | ||
26 | int file_fd; /* output file */ | |
27 | ||
28 | struct list_head list; | |
29 | ||
30 | long consumed_old; | |
31 | }; | |
32 | ||
33 | ssize_t patient_write(int fd, const void *buf, size_t count); | |
34 | ||
35 | void finish_consuming_dead_subbuffer(struct buffer_info *buf); | |
36 | ||
37 | #endif /* USTD_H */ |