X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=libringbuffer%2Ffrontend.h;h=9fa0f04d2a67d0bf6e1b46a997755e8fc16ff64e;hb=d33db5686925d2df0398b378b4751916b6139cf5;hp=2385d392e68f985c9061e02ee1f6690692b3ff09;hpb=1d4981969313da002983ca979bd85c95493f7316;p=lttng-ust.git diff --git a/libringbuffer/frontend.h b/libringbuffer/frontend.h index 2385d392..9fa0f04d 100644 --- a/libringbuffer/frontend.h +++ b/libringbuffer/frontend.h @@ -42,7 +42,19 @@ struct shm_handle *channel_create(const struct lib_ring_buffer_config *config, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, - unsigned int read_timer_interval); + unsigned int read_timer_interval, + int *shm_fd, int *wait_fd, + uint64_t *memory_map_size); + +/* channel_handle_create - for consumer. */ +extern +struct shm_handle *channel_handle_create(int shm_fd, int wait_fd, + uint64_t memory_map_size); + +/* channel_handle_add_stream - for consumer. */ +extern +int channel_handle_add_stream(struct shm_handle *handle, + int shm_fd, int wait_fd, uint64_t memory_map_size); /* * channel_destroy returns the private data pointer. It finalizes all channel's @@ -50,7 +62,8 @@ struct shm_handle *channel_create(const struct lib_ring_buffer_config *config, * channel. */ extern -void *channel_destroy(struct channel *chan, struct shm_handle *handle); +void *channel_destroy(struct channel *chan, struct shm_handle *handle, + int shadow); /* Buffer read operations */ @@ -67,11 +80,15 @@ void *channel_destroy(struct channel *chan, struct shm_handle *handle); extern struct lib_ring_buffer *channel_get_ring_buffer( const struct lib_ring_buffer_config *config, struct channel *chan, int cpu, - struct shm_handle *handle); + struct shm_handle *handle, + int *shm_fd, int *wait_fd, + uint64_t *memory_map_size); extern int lib_ring_buffer_open_read(struct lib_ring_buffer *buf, - struct shm_handle *handle); + struct shm_handle *handle, + int shadow); extern void lib_ring_buffer_release_read(struct lib_ring_buffer *buf, - struct shm_handle *handle); + struct shm_handle *handle, + int shadow); /* * Read sequence: snapshot, many get_subbuf/put_subbuf, move_consumer.