libust ABI: export streams
[lttng-ust.git] / libringbuffer / ring_buffer_frontend.c
index bd774dfa4645633708dc82c68f35a074436e73c2..7dab1594c3061a178d0c279e7f2c5fdb19d7eefd 100644 (file)
@@ -577,12 +577,23 @@ void *channel_destroy(struct channel *chan, struct shm_handle *handle)
 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)
 {
-       if (config->alloc == RING_BUFFER_ALLOC_GLOBAL)
+       struct shm_ref *ref;
+
+       if (config->alloc == RING_BUFFER_ALLOC_GLOBAL) {
+               ref = &chan->backend.buf[0].shmp._ref;
+               shm_get_object_data(handle, ref, shm_fd, wait_fd,
+                       memory_map_size);
                return shmp(handle, chan->backend.buf[0].shmp);
-       else
+       } else {
+               ref = &chan->backend.buf[cpu].shmp._ref;
+               shm_get_object_data(handle, ref, shm_fd, wait_fd,
+                       memory_map_size);
                return shmp(handle, chan->backend.buf[cpu].shmp);
+       }
 }
 
 int lib_ring_buffer_open_read(struct lib_ring_buffer *buf,
This page took 0.022963 seconds and 4 git commands to generate.