Add get mmap base
[ust.git] / include / ust / lttng-ust-ctl.h
index 96d627c3838d4c3dc805e4059dd33ab90101e571..ea3d0301c320a775e3e5fec744ecc0a6bd41c8b0 100644 (file)
@@ -70,9 +70,6 @@ int ustctl_wait_quiescent(int sock);
 struct lttng_ust_calibrate;
 int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate);
 
-/* TODO: object_data send/recv between sessiond and consumer */
-/* TODO: release shm_handle */
-
 /*
  * Map channel shm_handle and add streams. Typically performed by the
  * consumer to map the objects into its memory space.
@@ -80,12 +77,26 @@ int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate);
 struct shm_handle *ustctl_map_channel(struct object_data *chan_data);
 int ustctl_add_stream(struct shm_handle *shm_handle,
                struct object_data *stream_data);
+/*
+ * Note: the object_data from which the shm_handle is derived can only
+ * be released after unmapping the handle.
+ */
+void ustctl_unmap_channel(struct shm_handle *shm_handle);
 
 /* Buffer operations */
 
 struct shm_handle;
 struct lib_ring_buffer;
 
+void *ustctl_get_mmap_base(struct shm_handle *handle,
+               struct lib_ring_buffer *buf);
+
+/* Open/close stream buffers for read */
+struct lib_ring_buffer *ustctl_open_stream_read(struct shm_handle *handle,
+               int cpu);
+void ustctl_close_stream_read(struct shm_handle *handle,
+                struct lib_ring_buffer *buf);
+
 /* For mmap mode, readable without "get" operation */
 int ustctl_get_mmap_len(struct shm_handle *handle,
                struct lib_ring_buffer *buf,
@@ -98,6 +109,8 @@ int ustctl_get_max_subbuf_size(struct shm_handle *handle,
  * For mmap mode, operate on the current packet (between get/put or
  * get_next/put_next).
  */
+void *ustctl_get_mmap_base(struct shm_handle *handle,
+               struct lib_ring_buffer *buf);
 int ustctl_get_mmap_read_offset(struct shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *off);
 int ustctl_get_subbuf_size(struct shm_handle *handle,
This page took 0.022693 seconds and 4 git commands to generate.