From: Philippe Proulx Date: Wed, 26 Jul 2017 19:58:37 +0000 (-0400) Subject: bt_ctf_clock_value_create(): freeze clock class X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=0b4b8df9519c173bdea3262dba1a21a77e7a15c3 bt_ctf_clock_value_create(): freeze clock class 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 Signed-off-by: Jérémie Galarneau --- diff --git a/lib/ctf-ir/clock-class.c b/lib/ctf-ir/clock-class.c index 73df0413..5ebeba5a 100644 --- a/lib/ctf-ir/clock-class.c +++ b/lib/ctf-ir/clock-class.c @@ -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",