Move bt_context to bt_trace_descriptor
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Apr 2013 13:25:30 +0000 (09:25 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Apr 2013 13:25:30 +0000 (09:25 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c
formats/ctf/events.c
include/babeltrace/ctf-ir/metadata.h
include/babeltrace/format-internal.h

index c3249a01775b9280d99936f7a6970a543fdcff24..d24f1cb73e69433736cf007a004550621c28d05a 100644 (file)
@@ -2093,7 +2093,7 @@ void ctf_set_context(struct bt_trace_descriptor *descriptor,
        struct ctf_trace *td = container_of(descriptor, struct ctf_trace,
                        parent);
 
-       td->ctx = ctx;
+       td->parent.ctx = ctx;
 }
 
 static
index 3cf3b88f710234c851f5bf8ece79c2ab10fff594..1c4813da88147f51a00491913c03c90d47c7488f 100644 (file)
@@ -289,8 +289,8 @@ struct bt_context *bt_ctf_event_get_context(const struct bt_ctf_event *ctf_event
        cfs = container_of(event->stream, const struct ctf_file_stream,
                        parent);
        trace = cfs->parent.stream_class->trace;
-       if (trace->ctx)
-               ret = trace->ctx;
+       if (trace->parent.ctx)
+               ret = trace->parent.ctx;
 
        return ret;
 }
index e4ab593e5fc0192ef26a6d38201513412455bd47..482a8f0203795918e164b6381a62d3a26627ed09 100644 (file)
@@ -218,7 +218,6 @@ struct ctf_trace {
        /* Heap of streams, ordered to always get the lowest timestamp */
        struct ptr_heap *stream_heap;
 
-       struct bt_context *ctx;
        struct bt_trace_handle *handle;
 };
 
index 281fd1d99a8505f61b6a3f088b2d1f35c2e1586d..a6509389faf06052de75de767db213a25b571915 100644 (file)
@@ -30,6 +30,7 @@
  */
 
 #include <limits.h>
+#include <babeltrace/context-internal.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -38,6 +39,7 @@ extern "C" {
 /* Parent trace descriptor */
 struct bt_trace_descriptor {
        char path[PATH_MAX];            /* trace path */
+       struct bt_context *ctx;
 };
 
 #ifdef __cplusplus
This page took 0.031829 seconds and 4 git commands to generate.