Add a private pointer to the ctf_stream_pos
authorJulien Desfossez <jdesfossez@efficios.com>
Tue, 3 Dec 2013 22:34:56 +0000 (17:34 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 4 Dec 2013 19:29:16 +0000 (20:29 +0100)
This allows a custom packet_seek function to fetch private information
about the current stream.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c
include/babeltrace/ctf/types.h
include/babeltrace/format.h

index eef9f2abc8802cd19225b70e1b6f10f68363fef5..16a7ba0fd66e831b0691b17f75a812ace6964017 100644 (file)
@@ -2188,6 +2188,7 @@ void ctf_init_mmap_pos(struct ctf_stream_pos *pos,
        pos->flags = MAP_PRIVATE;
        pos->parent.rw_table = read_dispatch_table;
        pos->parent.event_cb = ctf_read_event;
+       pos->priv = mmap_info->priv;
 }
 
 static
index e90464dc76243e02a0c1d250ae973cd48cb45fa0..06c130f80d8773a691b427479aa830020690b3ce 100644 (file)
@@ -83,6 +83,7 @@ struct ctf_stream_pos {
 
        int dummy;              /* dummy position, for length calculation */
        struct bt_stream_callbacks *cb; /* Callbacks registered for iterator. */
+       void *priv;
 };
 
 static inline
index 07e854fee08645acb85b1e4cf0083992e385598e..dea8e0e5431e71d69e53df24fc97f1ed753bc18c 100644 (file)
@@ -49,6 +49,7 @@ struct bt_trace_descriptor;
 struct bt_mmap_stream {
        int fd;
        struct bt_list_head list;
+       void *priv;
 };
 
 struct bt_mmap_stream_list {
This page took 0.03098 seconds and 4 git commands to generate.