-#ifndef BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
-#define BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
-
/*
- * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
+ * SPDX-License-Identifier: MIT
*
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
*/
+#ifndef BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
+#define BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
+
+/* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
+
#ifndef __BT_IN_BABELTRACE_H
# error "Please include <babeltrace2/babeltrace.h> instead."
#endif
stream's default clock.
In other words, a default clock snapshot contains the value of the
- stream's default clock when this message occured.
+ stream's default clock when this message occurred.
The default clock class property of a \bt_stream_cls is optional:
if a stream class has no default clock class, then its instances
For example, considering:
- Frequency: 1000 Hz.
-- Offset in seconds: -10 seconds.
+- Offset in seconds: −10 seconds.
- Offset in cycles: 500 cycles (that is, 0.5 seconds).
- Stream clock's value: 2000 cycles (that is, 2 seconds).
-Then the computed value is -7.5 seconds from origin, or
--7,500,000,000 nanoseconds from origin.
+Then the computed value is −7.5 seconds from origin, or
+−7,500,000,000 nanoseconds from origin.
<h1>Properties</h1>
@bt_pre_not_null{self_component}
*/
-extern bt_clock_class *bt_clock_class_create(bt_self_component *self_component);
+extern bt_clock_class *bt_clock_class_create(bt_self_component *self_component)
+ __BT_NOEXCEPT;
/*! @} */
Returns the frequency of a clock class.
*/
extern void bt_clock_class_set_frequency(bt_clock_class *clock_class,
- uint64_t frequency);
+ uint64_t frequency) __BT_NOEXCEPT;
/*!
@brief
Sets the frequency of a clock class.
*/
extern uint64_t bt_clock_class_get_frequency(
- const bt_clock_class *clock_class);
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
Returns the offset of a clock class.
*/
extern void bt_clock_class_set_offset(bt_clock_class *clock_class,
- int64_t offset_seconds, uint64_t offset_cycles);
+ int64_t offset_seconds, uint64_t offset_cycles) __BT_NOEXCEPT;
/*!
@brief
Sets the offset of a clock class.
*/
extern void bt_clock_class_get_offset(const bt_clock_class *clock_class,
- int64_t *offset_seconds, uint64_t *offset_cycles);
+ int64_t *offset_seconds, uint64_t *offset_cycles) __BT_NOEXCEPT;
/*!
@brief
Returns the precision of a clock class.
*/
extern void bt_clock_class_set_precision(bt_clock_class *clock_class,
- uint64_t precision);
+ uint64_t precision) __BT_NOEXCEPT;
/*!
@brief
Sets the precision of a clock class.
*/
extern uint64_t bt_clock_class_get_precision(
- const bt_clock_class *clock_class);
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
Unix epoch.
*/
extern void bt_clock_class_set_origin_is_unix_epoch(bt_clock_class *clock_class,
- bt_bool origin_is_unix_epoch);
+ bt_bool origin_is_unix_epoch) __BT_NOEXCEPT;
/*!
@brief
Sets whether or not the origin of a clock class is the Unix epoch.
*/
extern bt_bool bt_clock_class_origin_is_unix_epoch(
- const bt_clock_class *clock_class);
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
Returns the name of a clock class.
*/
extern bt_clock_class_set_name_status bt_clock_class_set_name(
- bt_clock_class *clock_class, const char *name);
+ bt_clock_class *clock_class, const char *name) __BT_NOEXCEPT;
/*!
@brief
Sets the name of a clock class.
*/
extern const char *bt_clock_class_get_name(
- const bt_clock_class *clock_class);
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
Returns the description of a clock class.
*/
extern bt_clock_class_set_description_status bt_clock_class_set_description(
- bt_clock_class *clock_class, const char *description);
+ bt_clock_class *clock_class, const char *description)
+ __BT_NOEXCEPT;
/*!
@brief
Sets the description of a clock class.
*/
extern const char *bt_clock_class_get_description(
- const bt_clock_class *clock_class);
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
Returns the UUID of a clock class.
*/
extern void bt_clock_class_set_uuid(bt_clock_class *clock_class,
- bt_uuid uuid);
+ bt_uuid uuid) __BT_NOEXCEPT;
/*!
@brief
Sets the UUID of a clock class.
*/
extern bt_uuid bt_clock_class_get_uuid(
- const bt_clock_class *clock_class);
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
Borrows the user attributes of a clock class.
*/
extern void bt_clock_class_set_user_attributes(
- bt_clock_class *clock_class, const bt_value *user_attributes);
+ bt_clock_class *clock_class, const bt_value *user_attributes)
+ __BT_NOEXCEPT;
/*!
@brief
\c const version of this function.
*/
extern bt_value *bt_clock_class_borrow_user_attributes(
- bt_clock_class *clock_class);
+ bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
See bt_clock_class_borrow_user_attributes().
*/
extern const bt_value *bt_clock_class_borrow_user_attributes_const(
- const bt_clock_class *clock_class);
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*! @} */
extern bt_clock_class_cycles_to_ns_from_origin_status
bt_clock_class_cycles_to_ns_from_origin(
const bt_clock_class *clock_class,
- uint64_t value, int64_t *ns_from_origin);
+ uint64_t value, int64_t *ns_from_origin) __BT_NOEXCEPT;
/*! @} */
@sa bt_clock_class_put_ref() —
Decrements the reference count of a clock class.
*/
-extern void bt_clock_class_get_ref(const bt_clock_class *clock_class);
+extern void bt_clock_class_get_ref(
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
@sa bt_clock_class_get_ref() —
Increments the reference count of a clock class.
*/
-extern void bt_clock_class_put_ref(const bt_clock_class *clock_class);
+extern void bt_clock_class_put_ref(
+ const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief