bt_ctf_clock_value_create(): freeze clock class
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 26 Jul 2017 19:58:37 +0000 (15:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Aug 2017 22:54:15 +0000 (18:54 -0400)
This is how other classes in the library work: when you instantiate a
class as a value (here a clock class as a clock value), the class is
frozen.

This patch does not seem to break the tests or change anything to the
CLI and plugins, which means all clock classes are already configured
before clock values are created out of them.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ctf-ir/clock-class.c

index 73df0413aaafb521e3a83d0b7c63f0e342e47b44..5ebeba5a73843ba03f4f39190e5b628a36c7867f 100644 (file)
@@ -782,6 +782,7 @@ struct bt_ctf_clock_value *bt_ctf_clock_value_create(
        ret->clock_class = bt_get(clock_class);
        ret->value = value;
        set_ns_from_epoch(ret);
+       bt_ctf_clock_class_freeze(clock_class);
        BT_LOGD("Created clock value object: clock-value-addr=%p, "
                "clock-class-addr=%p, clock-class-name=\"%s\", "
                "ns-from-epoch=%" PRId64 ", ns-from-epoch-overflows=%d",
This page took 0.02457 seconds and 4 git commands to generate.