From 0b4b8df9519c173bdea3262dba1a21a77e7a15c3 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 26 Jul 2017 15:58:37 -0400 Subject: [PATCH] bt_ctf_clock_value_create(): freeze clock class MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- lib/ctf-ir/clock-class.c | 1 + 1 file changed, 1 insertion(+) 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", -- 2.34.1