+ ref = &chan->backend.buf[cpu].shmp._ref;
+ return shm_close_wait_fd(handle, ref);
+}
+
+int ring_buffer_close_wakeup_fd(const struct lttng_ust_lib_ring_buffer_config *config,
+ struct channel *chan,
+ struct lttng_ust_shm_handle *handle,
+ int cpu)
+{
+ struct shm_ref *ref;
+
+ if (config->alloc == RING_BUFFER_ALLOC_GLOBAL) {
+ cpu = 0;
+ } else {
+ if (cpu >= num_possible_cpus())
+ return -EINVAL;
+ }
+ ref = &chan->backend.buf[cpu].shmp._ref;
+ return shm_close_wakeup_fd(handle, ref);
+}
+
+int lib_ring_buffer_open_read(struct lttng_ust_lib_ring_buffer *buf,
+ struct lttng_ust_shm_handle *handle)
+{