Check for num cpus
[lttng-ust.git] / libringbuffer / frontend.h
index 2385d392e68f985c9061e02ee1f6690692b3ff09..9fa0f04d2a67d0bf6e1b46a997755e8fc16ff64e 100644 (file)
@@ -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.
This page took 0.025753 seconds and 4 git commands to generate.