40654e990144c9dace17d393a47828f1be9517a2
4 * Babeltrace CTF IR - Clock class
6 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 * Permission is hereby granted, free of charge, to any person obtaining a copy
11 * of this software and associated documentation files (the "Software"), to deal
12 * in the Software without restriction, including without limitation the rights
13 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 * copies of the Software, and to permit persons to whom the Software is
15 * furnished to do so, subject to the following conditions:
17 * The above copyright notice and this permission notice shall be included in
18 * all copies or substantial portions of the Software.
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 #define BT_LOG_TAG "CLOCK-CLASS"
30 #include <babeltrace/lib-logging-internal.h>
32 #include <babeltrace/compat/uuid-internal.h>
33 #include <babeltrace/ctf-ir/clock-class-internal.h>
34 #include <babeltrace/ctf-ir/clock-value-internal.h>
35 #include <babeltrace/ctf-ir/utils.h>
36 #include <babeltrace/ref.h>
37 #include <babeltrace/compiler-internal.h>
38 #include <babeltrace/types.h>
39 #include <babeltrace/compat/string-internal.h>
41 #include <babeltrace/object-internal.h>
42 #include <babeltrace/assert-internal.h>
45 void bt_clock_class_destroy(struct bt_object
*obj
);
48 bt_bool
bt_clock_class_is_valid(struct bt_clock_class
*clock_class
)
50 return clock_class
&& clock_class
->name
;
53 int bt_clock_class_set_name(struct bt_clock_class
*clock_class
,
59 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
64 if (clock_class
->frozen
) {
65 BT_LOGW("Invalid parameter: clock class is frozen: addr=%p, name=\"%s\"",
66 clock_class
, bt_clock_class_get_name(clock_class
));
71 if (!bt_identifier_is_valid(name
)) {
72 BT_LOGW("Clock class's name is not a valid CTF identifier: "
73 "addr=%p, name=\"%s\"",
79 if (clock_class
->name
) {
80 g_string_assign(clock_class
->name
, name
);
82 clock_class
->name
= g_string_new(name
);
83 if (!clock_class
->name
) {
84 BT_LOGE_STR("Failed to allocate a GString.");
90 BT_LOGV("Set clock class's name: addr=%p, name=\"%s\"",
98 bool validate_freq(struct bt_clock_class
*clock_class
,
99 const char *name
, uint64_t freq
)
101 bool is_valid
= true;
103 if (freq
== -1ULL || freq
== 0) {
104 BT_LOGW("Invalid parameter: frequency is invalid: "
105 "addr=%p, name=\"%s\", freq=%" PRIu64
,
106 clock_class
, name
, freq
);
115 struct bt_clock_class
*bt_clock_class_create(const char *name
,
119 struct bt_clock_class
*clock_class
= NULL
;
121 BT_LOGD("Creating default clock class object: name=\"%s\"",
124 if (!validate_freq(NULL
, name
, freq
)) {
125 /* validate_freq() logs errors */
129 clock_class
= g_new0(struct bt_clock_class
, 1);
131 BT_LOGE_STR("Failed to allocate one clock class.");
135 clock_class
->precision
= 1;
136 clock_class
->frequency
= freq
;
137 bt_object_init(clock_class
, bt_clock_class_destroy
);
140 ret
= bt_clock_class_set_name(clock_class
, name
);
142 /* bt_clock_class_set_name() logs errors */
147 BT_LOGD("Created clock class object: addr=%p, name=\"%s\"",
155 const char *bt_clock_class_get_name(struct bt_clock_class
*clock_class
)
157 const char *ret
= NULL
;
160 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
164 if (clock_class
->name
) {
165 ret
= clock_class
->name
->str
;
172 const char *bt_clock_class_get_description(
173 struct bt_clock_class
*clock_class
)
175 const char *ret
= NULL
;
178 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
182 if (clock_class
->description
) {
183 ret
= clock_class
->description
->str
;
189 int bt_clock_class_set_description(struct bt_clock_class
*clock_class
,
194 if (!clock_class
|| !desc
) {
195 BT_LOGW("Invalid parameter: clock class or description is NULL: "
196 "clock-class-addr=%p, name=\"%s\", desc-addr=%p",
197 clock_class
, bt_clock_class_get_name(clock_class
),
203 if (clock_class
->frozen
) {
204 BT_LOGW("Invalid parameter: clock class is frozen: addr=%p, name=\"%s\"",
205 clock_class
, bt_clock_class_get_name(clock_class
));
210 clock_class
->description
= g_string_new(desc
);
211 ret
= clock_class
->description
? 0 : -1;
212 BT_LOGV("Set clock class's description: addr=%p, "
213 "name=\"%s\", desc=\"%s\"",
214 clock_class
, bt_clock_class_get_name(clock_class
), desc
);
219 uint64_t bt_clock_class_get_frequency(
220 struct bt_clock_class
*clock_class
)
222 uint64_t ret
= -1ULL;
225 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
229 ret
= clock_class
->frequency
;
234 int bt_clock_class_set_frequency(struct bt_clock_class
*clock_class
,
240 BT_LOGW("Invalid parameter: clock class is NULL or frequency is invalid: "
241 "addr=%p, name=\"%s\"",
242 clock_class
, bt_clock_class_get_name(clock_class
));
247 if (!validate_freq(clock_class
, bt_clock_class_get_name(clock_class
),
249 /* validate_freq() logs errors */
253 if (clock_class
->frozen
) {
254 BT_LOGW("Invalid parameter: clock class is frozen: addr=%p, name=\"%s\"",
255 clock_class
, bt_clock_class_get_name(clock_class
));
260 clock_class
->frequency
= freq
;
261 BT_LOGV("Set clock class's frequency: addr=%p, name=\"%s\", freq=%" PRIu64
,
262 clock_class
, bt_clock_class_get_name(clock_class
), freq
);
267 uint64_t bt_clock_class_get_precision(struct bt_clock_class
*clock_class
)
269 uint64_t ret
= -1ULL;
272 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
276 ret
= clock_class
->precision
;
281 int bt_clock_class_set_precision(struct bt_clock_class
*clock_class
,
286 if (!clock_class
|| precision
== -1ULL) {
287 BT_LOGW("Invalid parameter: clock class is NULL or precision is invalid: "
288 "addr=%p, name=\"%s\", precision=%" PRIu64
,
289 clock_class
, bt_clock_class_get_name(clock_class
),
295 if (clock_class
->frozen
) {
296 BT_LOGW("Invalid parameter: clock class is frozen: addr=%p, name=\"%s\"",
297 clock_class
, bt_clock_class_get_name(clock_class
));
302 clock_class
->precision
= precision
;
303 BT_LOGV("Set clock class's precision: addr=%p, name=\"%s\", precision=%" PRIu64
,
304 clock_class
, bt_clock_class_get_name(clock_class
),
310 int bt_clock_class_get_offset_s(struct bt_clock_class
*clock_class
,
315 if (!clock_class
|| !offset_s
) {
316 BT_LOGW("Invalid parameter: clock class or offset pointer is NULL: "
317 "clock-class-addr=%p, name=\"%s\", offset-addr=%p",
318 clock_class
, bt_clock_class_get_name(clock_class
),
324 *offset_s
= clock_class
->offset_s
;
329 int bt_clock_class_set_offset_s(struct bt_clock_class
*clock_class
,
335 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
340 if (clock_class
->frozen
) {
341 BT_LOGW("Invalid parameter: clock class is frozen: addr=%p, name=\"%s\"",
342 clock_class
, bt_clock_class_get_name(clock_class
));
347 clock_class
->offset_s
= offset_s
;
348 BT_LOGV("Set clock class's offset (seconds): "
349 "addr=%p, name=\"%s\", offset-s=%" PRId64
,
350 clock_class
, bt_clock_class_get_name(clock_class
),
356 int bt_clock_class_get_offset_cycles(struct bt_clock_class
*clock_class
,
361 if (!clock_class
|| !offset
) {
362 BT_LOGW("Invalid parameter: clock class or offset pointer is NULL: "
363 "clock-class-addr=%p, name=\"%s\", offset-addr=%p",
364 clock_class
, bt_clock_class_get_name(clock_class
),
370 *offset
= clock_class
->offset
;
375 int bt_clock_class_set_offset_cycles(struct bt_clock_class
*clock_class
,
381 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
386 if (clock_class
->frozen
) {
387 BT_LOGW("Invalid parameter: clock class is frozen: addr=%p, name=\"%s\"",
388 clock_class
, bt_clock_class_get_name(clock_class
));
393 clock_class
->offset
= offset
;
394 BT_LOGV("Set clock class's offset (cycles): addr=%p, name=\"%s\", offset-cycles=%" PRId64
,
395 clock_class
, bt_clock_class_get_name(clock_class
), offset
);
400 bt_bool
bt_clock_class_is_absolute(struct bt_clock_class
*clock_class
)
405 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
409 ret
= clock_class
->absolute
;
414 int bt_clock_class_set_is_absolute(struct bt_clock_class
*clock_class
,
420 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
425 if (clock_class
->frozen
) {
426 BT_LOGW("Invalid parameter: clock class is frozen: addr=%p, name=\"%s\"",
427 clock_class
, bt_clock_class_get_name(clock_class
));
432 clock_class
->absolute
= !!is_absolute
;
433 BT_LOGV("Set clock class's absolute flag: addr=%p, name=\"%s\", is-absolute=%d",
434 clock_class
, bt_clock_class_get_name(clock_class
),
440 const unsigned char *bt_clock_class_get_uuid(
441 struct bt_clock_class
*clock_class
)
443 const unsigned char *ret
;
446 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
451 if (!clock_class
->uuid_set
) {
452 BT_LOGV("Clock class's UUID is not set: addr=%p, name=\"%s\"",
453 clock_class
, bt_clock_class_get_name(clock_class
));
458 ret
= clock_class
->uuid
;
463 int bt_clock_class_set_uuid(struct bt_clock_class
*clock_class
,
464 const unsigned char *uuid
)
468 if (!clock_class
|| !uuid
) {
469 BT_LOGW("Invalid parameter: clock class or UUID is NULL: "
470 "clock-class-addr=%p, name=\"%s\", uuid-addr=%p",
471 clock_class
, bt_clock_class_get_name(clock_class
),
477 if (clock_class
->frozen
) {
478 BT_LOGW("Invalid parameter: clock class is frozen: addr=%p, name=\"%s\"",
479 clock_class
, bt_clock_class_get_name(clock_class
));
484 memcpy(clock_class
->uuid
, uuid
, BABELTRACE_UUID_LEN
);
485 clock_class
->uuid_set
= 1;
486 BT_LOGV("Set clock class's UUID: addr=%p, name=\"%s\", "
487 "uuid=\"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\"",
488 clock_class
, bt_clock_class_get_name(clock_class
),
489 (unsigned int) uuid
[0],
490 (unsigned int) uuid
[1],
491 (unsigned int) uuid
[2],
492 (unsigned int) uuid
[3],
493 (unsigned int) uuid
[4],
494 (unsigned int) uuid
[5],
495 (unsigned int) uuid
[6],
496 (unsigned int) uuid
[7],
497 (unsigned int) uuid
[8],
498 (unsigned int) uuid
[9],
499 (unsigned int) uuid
[10],
500 (unsigned int) uuid
[11],
501 (unsigned int) uuid
[12],
502 (unsigned int) uuid
[13],
503 (unsigned int) uuid
[14],
504 (unsigned int) uuid
[15]);
509 static uint64_t ns_from_value(uint64_t frequency
, uint64_t value
)
513 if (frequency
== 1000000000) {
516 double dblres
= ((1e9
* (double) value
) / (double) frequency
);
518 if (dblres
>= (double) UINT64_MAX
) {
519 /* Overflows uint64_t */
522 ns
= (uint64_t) dblres
;
530 void bt_clock_class_freeze(struct bt_clock_class
*clock_class
)
532 if (!clock_class
|| clock_class
->frozen
) {
536 BT_LOGD("Freezing clock class: addr=%p, name=\"%s\"",
537 clock_class
, bt_clock_class_get_name(clock_class
));
538 clock_class
->frozen
= 1;
542 void bt_clock_class_destroy(struct bt_object
*obj
)
544 struct bt_clock_class
*clock_class
;
546 clock_class
= container_of(obj
, struct bt_clock_class
, base
);
547 BT_LOGD("Destroying clock class: addr=%p, name=\"%s\"",
548 obj
, bt_clock_class_get_name(clock_class
));
549 if (clock_class
->name
) {
550 g_string_free(clock_class
->name
, TRUE
);
552 if (clock_class
->description
) {
553 g_string_free(clock_class
->description
, TRUE
);
560 void bt_clock_value_destroy(struct bt_object
*obj
)
562 struct bt_clock_value
*value
;
568 value
= container_of(obj
, struct bt_clock_value
, base
);
569 BT_LOGD("Destroying clock value: addr=%p, clock-class-addr=%p, "
570 "clock-class-name=\"%s\"", obj
, value
->clock_class
,
571 bt_clock_class_get_name(value
->clock_class
));
572 bt_put(value
->clock_class
);
577 void set_ns_from_epoch(struct bt_clock_value
*clock_value
)
579 struct bt_clock_class
*clock_class
= clock_value
->clock_class
;
585 /* Initialize nanosecond timestamp to clock's offset in seconds */
586 if (clock_class
->offset_s
<= (INT64_MIN
/ 1000000000) ||
587 clock_class
->offset_s
>= (INT64_MAX
/ 1000000000)) {
589 * Overflow: offset in seconds converted to nanoseconds
590 * is outside the int64_t range.
592 clock_value
->ns_from_epoch_overflows
= true;
596 clock_value
->ns_from_epoch
= clock_class
->offset_s
* (int64_t) 1000000000;
598 /* Add offset in cycles */
599 if (clock_class
->offset
< 0) {
600 cycles
= (uint64_t) (-clock_class
->offset
);
602 cycles
= (uint64_t) clock_class
->offset
;
605 u_ns
= ns_from_value(clock_class
->frequency
, cycles
);
607 if (u_ns
== -1ULL || u_ns
>= INT64_MAX
) {
609 * Overflow: offset in cycles converted to nanoseconds
610 * is outside the int64_t range.
612 clock_value
->ns_from_epoch_overflows
= true;
616 s_ns
= (int64_t) u_ns
;
617 BT_ASSERT(s_ns
>= 0);
619 if (clock_class
->offset
< 0) {
620 if (clock_value
->ns_from_epoch
>= 0) {
622 * Offset in cycles is negative so it must also
623 * be negative once converted to nanoseconds.
629 diff
= clock_value
->ns_from_epoch
- INT64_MIN
;
633 * Overflow: current timestamp in nanoseconds
634 * plus the offset in cycles converted to
635 * nanoseconds is outside the int64_t range.
637 clock_value
->ns_from_epoch_overflows
= true;
642 * Offset in cycles is negative so it must also be
643 * negative once converted to nanoseconds.
647 if (clock_value
->ns_from_epoch
<= 0) {
651 diff
= INT64_MAX
- clock_value
->ns_from_epoch
;
655 * Overflow: current timestamp in nanoseconds
656 * plus the offset in cycles converted to
657 * nanoseconds is outside the int64_t range.
659 clock_value
->ns_from_epoch_overflows
= true;
665 clock_value
->ns_from_epoch
+= s_ns
;
667 /* Add clock value (cycles) */
668 u_ns
= ns_from_value(clock_class
->frequency
, clock_value
->value
);
670 if (u_ns
== -1ULL || u_ns
>= INT64_MAX
) {
672 * Overflow: value converted to nanoseconds is outside
675 clock_value
->ns_from_epoch_overflows
= true;
679 s_ns
= (int64_t) u_ns
;
680 BT_ASSERT(s_ns
>= 0);
682 /* Clock value (cycles) is always positive */
683 if (clock_value
->ns_from_epoch
<= 0) {
687 diff
= INT64_MAX
- clock_value
->ns_from_epoch
;
691 * Overflow: current timestamp in nanoseconds plus the
692 * clock value converted to nanoseconds is outside the
695 clock_value
->ns_from_epoch_overflows
= true;
700 clock_value
->ns_from_epoch
+= s_ns
;
703 if (clock_value
->ns_from_epoch_overflows
) {
704 clock_value
->ns_from_epoch
= 0;
708 struct bt_clock_value
*bt_clock_value_create(
709 struct bt_clock_class
*clock_class
, uint64_t value
)
711 struct bt_clock_value
*ret
= NULL
;
713 BT_LOGD("Creating clock value object: clock-class-addr=%p, "
714 "clock-class-name=\"%s\", value=%" PRIu64
, clock_class
,
715 bt_clock_class_get_name(clock_class
), value
);
718 BT_LOGW_STR("Invalid parameter: clock class is NULL.");
722 ret
= g_new0(struct bt_clock_value
, 1);
724 BT_LOGE_STR("Failed to allocate one clock value.");
728 bt_object_init(ret
, bt_clock_value_destroy
);
729 ret
->clock_class
= bt_get(clock_class
);
731 set_ns_from_epoch(ret
);
732 bt_clock_class_freeze(clock_class
);
733 BT_LOGD("Created clock value object: clock-value-addr=%p, "
734 "clock-class-addr=%p, clock-class-name=\"%s\", "
735 "ns-from-epoch=%" PRId64
", ns-from-epoch-overflows=%d",
736 ret
, clock_class
, bt_clock_class_get_name(clock_class
),
737 ret
->ns_from_epoch
, ret
->ns_from_epoch_overflows
);
743 int bt_clock_value_get_value(
744 struct bt_clock_value
*clock_value
, uint64_t *raw_value
)
748 if (!clock_value
|| !raw_value
) {
749 BT_LOGW("Invalid parameter: clock value or raw value is NULL: "
750 "clock-value-addr=%p, raw-value-addr=%p",
751 clock_value
, raw_value
);
756 *raw_value
= clock_value
->value
;
761 int bt_clock_value_get_value_ns_from_epoch(struct bt_clock_value
*value
,
762 int64_t *ret_value_ns
)
766 if (!value
|| !ret_value_ns
) {
767 BT_LOGW("Invalid parameter: clock value or return value pointer is NULL: "
768 "clock-value-addr=%p, ret-value-addr=%p",
769 value
, ret_value_ns
);
774 if (value
->ns_from_epoch_overflows
) {
775 BT_LOGW("Clock value converted to nanoseconds from Epoch overflows the signed 64-bit integer range: "
776 "clock-value-addr=%p, "
777 "clock-class-offset-s=%" PRId64
", "
778 "clock-class-offset-cycles=%" PRId64
", "
780 value
, value
->clock_class
->offset_s
,
781 value
->clock_class
->offset
,
787 *ret_value_ns
= value
->ns_from_epoch
;
793 struct bt_clock_class
*bt_clock_value_get_class(
794 struct bt_clock_value
*clock_value
)
796 struct bt_clock_class
*clock_class
= NULL
;
799 BT_LOGW_STR("Invalid parameter: clock value is NULL.");
803 clock_class
= bt_get(clock_value
->clock_class
);
810 int bt_clock_class_compare(struct bt_clock_class
*clock_class_a
,
811 struct bt_clock_class
*clock_class_b
)
814 BT_ASSERT(clock_class_a
);
815 BT_ASSERT(clock_class_b
);
818 if (strcmp(clock_class_a
->name
->str
, clock_class_b
->name
->str
) != 0) {
819 BT_LOGV("Clock classes differ: different names: "
820 "cc-a-name=\"%s\", cc-b-name=\"%s\"",
821 clock_class_a
->name
->str
,
822 clock_class_b
->name
->str
);
827 if (clock_class_a
->description
) {
828 if (!clock_class_b
->description
) {
829 BT_LOGV_STR("Clock classes differ: clock class A has a "
830 "description, but clock class B does not.");
834 if (strcmp(clock_class_a
->name
->str
, clock_class_b
->name
->str
)
836 BT_LOGV("Clock classes differ: different descriptions: "
837 "cc-a-descr=\"%s\", cc-b-descr=\"%s\"",
838 clock_class_a
->description
->str
,
839 clock_class_b
->description
->str
);
843 if (clock_class_b
->description
) {
844 BT_LOGV_STR("Clock classes differ: clock class A has "
845 "no description, but clock class B has one.");
851 if (clock_class_a
->frequency
!= clock_class_b
->frequency
) {
852 BT_LOGV("Clock classes differ: different frequencies: "
853 "cc-a-freq=%" PRIu64
", cc-b-freq=%" PRIu64
,
854 clock_class_a
->frequency
,
855 clock_class_b
->frequency
);
860 if (clock_class_a
->precision
!= clock_class_b
->precision
) {
861 BT_LOGV("Clock classes differ: different precisions: "
862 "cc-a-freq=%" PRIu64
", cc-b-freq=%" PRIu64
,
863 clock_class_a
->precision
,
864 clock_class_b
->precision
);
868 /* Offset (seconds) */
869 if (clock_class_a
->offset_s
!= clock_class_b
->offset_s
) {
870 BT_LOGV("Clock classes differ: different offsets (seconds): "
871 "cc-a-offset-s=%" PRId64
", cc-b-offset-s=%" PRId64
,
872 clock_class_a
->offset_s
,
873 clock_class_b
->offset_s
);
877 /* Offset (cycles) */
878 if (clock_class_a
->offset
!= clock_class_b
->offset
) {
879 BT_LOGV("Clock classes differ: different offsets (cycles): "
880 "cc-a-offset-s=%" PRId64
", cc-b-offset-s=%" PRId64
,
881 clock_class_a
->offset
,
882 clock_class_b
->offset
);
887 if (clock_class_a
->uuid_set
) {
888 if (!clock_class_b
->uuid_set
) {
889 BT_LOGV_STR("Clock classes differ: clock class A has a "
890 "UUID, but clock class B does not.");
894 if (memcmp(clock_class_a
->uuid
, clock_class_b
->uuid
,
895 BABELTRACE_UUID_LEN
) != 0) {
896 BT_LOGV("Clock classes differ: different UUIDs: "
897 "cc-a-uuid=\"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\", "
898 "cc-b-uuid=\"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\"",
899 (unsigned int) clock_class_a
->uuid
[0],
900 (unsigned int) clock_class_a
->uuid
[1],
901 (unsigned int) clock_class_a
->uuid
[2],
902 (unsigned int) clock_class_a
->uuid
[3],
903 (unsigned int) clock_class_a
->uuid
[4],
904 (unsigned int) clock_class_a
->uuid
[5],
905 (unsigned int) clock_class_a
->uuid
[6],
906 (unsigned int) clock_class_a
->uuid
[7],
907 (unsigned int) clock_class_a
->uuid
[8],
908 (unsigned int) clock_class_a
->uuid
[9],
909 (unsigned int) clock_class_a
->uuid
[10],
910 (unsigned int) clock_class_a
->uuid
[11],
911 (unsigned int) clock_class_a
->uuid
[12],
912 (unsigned int) clock_class_a
->uuid
[13],
913 (unsigned int) clock_class_a
->uuid
[14],
914 (unsigned int) clock_class_a
->uuid
[15],
915 (unsigned int) clock_class_b
->uuid
[0],
916 (unsigned int) clock_class_b
->uuid
[1],
917 (unsigned int) clock_class_b
->uuid
[2],
918 (unsigned int) clock_class_b
->uuid
[3],
919 (unsigned int) clock_class_b
->uuid
[4],
920 (unsigned int) clock_class_b
->uuid
[5],
921 (unsigned int) clock_class_b
->uuid
[6],
922 (unsigned int) clock_class_b
->uuid
[7],
923 (unsigned int) clock_class_b
->uuid
[8],
924 (unsigned int) clock_class_b
->uuid
[9],
925 (unsigned int) clock_class_b
->uuid
[10],
926 (unsigned int) clock_class_b
->uuid
[11],
927 (unsigned int) clock_class_b
->uuid
[12],
928 (unsigned int) clock_class_b
->uuid
[13],
929 (unsigned int) clock_class_b
->uuid
[14],
930 (unsigned int) clock_class_b
->uuid
[15]);
934 if (clock_class_b
->uuid_set
) {
935 BT_LOGV_STR("Clock classes differ: clock class A has "
936 "no UUID, but clock class B has one.");
942 if (!!clock_class_a
->absolute
!= !!clock_class_b
->absolute
) {
943 BT_LOGV("Clock classes differ: one is absolute, the other "
944 "is not: cc-a-is-absolute=%d, cc-b-is-absolute=%d",
945 !!clock_class_a
->absolute
,
946 !!clock_class_b
->absolute
);
This page took 0.050223 seconds and 4 git commands to generate.