Add bt_ctf_clock_value_get_class()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 4 Feb 2017 08:18:06 +0000 (03:18 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:37 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/clock-class.c
include/babeltrace/ctf-ir/clock-class.h

index c51b5aabf6bbde4e5df4a440d88fcef8ee8088da..66f7f440dd71a0e63228f9acbe27277afbbedd9f 100644 (file)
@@ -480,3 +480,18 @@ int bt_ctf_clock_value_get_value_ns_from_epoch(struct bt_ctf_clock_value *value,
 end:
        return ret;
 }
+
+struct bt_ctf_clock_class *bt_ctf_clock_value_get_class(
+               struct bt_ctf_clock_value *clock_value)
+{
+       struct bt_ctf_clock_class *clock_class = NULL;
+
+       if (!clock_value) {
+               goto end;
+       }
+
+       clock_class = bt_get(clock_value->clock_class);
+
+end:
+       return clock_class;
+}
index c2b9017397e854a32773e37e6130b1919e60ec23..d9c704d28e7700cee2fcbb0af543a3cd2df7fea4 100644 (file)
@@ -76,6 +76,8 @@ extern int bt_ctf_clock_class_set_uuid(struct bt_ctf_clock_class *clock_class,
                const unsigned char *uuid);
 extern struct bt_ctf_clock_value *bt_ctf_clock_value_create(
                struct bt_ctf_clock_class *clock_class, uint64_t value);
+extern struct bt_ctf_clock_class *bt_ctf_clock_value_get_class(
+               struct bt_ctf_clock_value *clock_value);
 extern int bt_ctf_clock_value_get_value(
                struct bt_ctf_clock_value *clock_value, uint64_t *raw_value);
 extern int bt_ctf_clock_value_get_value_ns_from_epoch(
This page took 0.025205 seconds and 4 git commands to generate.