+static
+int ltt_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle)
+{
+ struct lttng_ust_lib_ring_buffer *buf;
+ int shm_fd, wait_fd;
+ uint64_t memory_map_size;
+
+ buf = channel_get_ring_buffer(&client_config, chan,
+ 0, handle, &shm_fd, &wait_fd,
+ &memory_map_size);
+ lib_ring_buffer_switch(&client_config, buf,
+ SWITCH_ACTIVE, handle);
+ return 0;
+}
+