lib: make clock class precision optional
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 1 Sep 2023 19:16:26 +0000 (15:16 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
commita8e200adc539c58c6ac98472ff6d708ba22a3c72
tree514f2fb2b1667836e32332538bb8db3f578f06cd
parent5ffd1fe9b4c1d906abe1e9cb1917f416b52e3ff1
lib: make clock class precision optional

With the intent of supporting CTF 2, make the precision property of
clock classes optional under MIP 1.

 - Change the precision field of struct bt_clock_class to
   bt_property_uint.
 - Adjust lib-logging to omit the precision if not set.
 - Change bt_clock_class_create to make the precision property available
   with MIP 0, so that the precision will always be available with MIP
   0 (still with an initial value of 0).
 - Restrict bt_clock_class_get_precision to MIP 0.
 - Add bt_clock_class_get_opt_precision, which returns a
   bt_property_availability value.  Note that
   bt_clock_class_get_opt_precision can be used with MIP 0, it will
   always return BT_PROPERTY_AVAILABILITY_AVAILABLE.

Not done in this patch: adapt the Python bindings.

Philippe updated the documentation.

Change-Id: I1daf6627fda741f854d85ad6ff6f4ad132591662
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10710
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12724
include/babeltrace2/trace-ir/clock-class.h
src/lib/lib-logging.c
src/lib/trace-ir/clock-class.c
src/lib/trace-ir/clock-class.h
This page took 0.023947 seconds and 4 git commands to generate.