projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: remove unused bt_graph_remove_unconnected_component()
[babeltrace.git]
/
src
/
lib
/
trace-ir
/
clock-snapshot-set.h
diff --git
a/src/lib/trace-ir/clock-snapshot-set.h
b/src/lib/trace-ir/clock-snapshot-set.h
index 0ad92809724b0259547f67fe53458e4ac4ca872e..7c3e7eb2421c0bcb93d37ec1e20839d1d27aeb85 100644
(file)
--- a/
src/lib/trace-ir/clock-snapshot-set.h
+++ b/
src/lib/trace-ir/clock-snapshot-set.h
@@
-23,6
+23,11
@@
* SOFTWARE.
*/
* SOFTWARE.
*/
+/* Protection: this file uses BT_LIB_LOG*() macros directly */
+#ifndef BT_LIB_LOG_SUPPORTED
+# error Please include "lib/logging.h" before including this file.
+#endif
+
#include <stdint.h>
#include <glib.h>
#include "common/assert.h"
#include <stdint.h>
#include <glib.h>
#include "common/assert.h"
@@
-30,6
+35,11
@@
#include "clock-snapshot.h"
#include "clock-class.h"
#include "clock-snapshot.h"
#include "clock-class.h"
+/* Protection: this file uses BT_LIB_LOG*() macros directly */
+#ifndef BT_LIB_LOG_SUPPORTED
+# error Please include "lib/logging.h" before including this file.
+#endif
+
struct bt_clock_snapshot_set {
/* Unique objects owned by this */
GPtrArray *clock_snapshots;
struct bt_clock_snapshot_set {
/* Unique objects owned by this */
GPtrArray *clock_snapshots;
@@
-45,10
+55,7
@@
int bt_clock_snapshot_set_initialize(struct bt_clock_snapshot_set *cs_set)
cs_set->clock_snapshots = g_ptr_array_sized_new(1);
if (!cs_set->clock_snapshots) {
cs_set->clock_snapshots = g_ptr_array_sized_new(1);
if (!cs_set->clock_snapshots) {
-#ifdef BT_LOGE_STR
- BT_LOGE_STR("Failed to allocate one GPtrArray.");
-#endif
-
+ BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one GPtrArray.");
ret = -1;
goto end;
}
ret = -1;
goto end;
}
@@
-64,13
+71,13
@@
void bt_clock_snapshot_set_reset(struct bt_clock_snapshot_set *cs_set)
{
uint64_t i;
{
uint64_t i;
- BT_ASSERT(cs_set);
- BT_ASSERT(cs_set->clock_snapshots);
+ BT_ASSERT
_DBG
(cs_set);
+ BT_ASSERT
_DBG
(cs_set->clock_snapshots);
for (i = 0; i < cs_set->clock_snapshots->len; i++) {
struct bt_clock_snapshot *cs = cs_set->clock_snapshots->pdata[i];
for (i = 0; i < cs_set->clock_snapshots->len; i++) {
struct bt_clock_snapshot *cs = cs_set->clock_snapshots->pdata[i];
- BT_ASSERT(cs);
+ BT_ASSERT
_DBG
(cs);
bt_clock_snapshot_reset(cs);
}
bt_clock_snapshot_reset(cs);
}
@@
-107,8
+114,8
@@
int bt_clock_snapshot_set_set_clock_snapshot(struct bt_clock_snapshot_set *cs_se
struct bt_clock_snapshot *clock_snapshot = NULL;
uint64_t i;
struct bt_clock_snapshot *clock_snapshot = NULL;
uint64_t i;
- BT_ASSERT(cs_set);
- BT_ASSERT(cc);
+ BT_ASSERT
_DBG
(cs_set);
+ BT_ASSERT
_DBG
(cc);
/*
* Check if we already have a value for this clock class.
/*
* Check if we already have a value for this clock class.
@@
-119,7
+126,7
@@
int bt_clock_snapshot_set_set_clock_snapshot(struct bt_clock_snapshot_set *cs_se
for (i = 0; i < cs_set->clock_snapshots->len; i++) {
struct bt_clock_snapshot *cs = cs_set->clock_snapshots->pdata[i];
for (i = 0; i < cs_set->clock_snapshots->len; i++) {
struct bt_clock_snapshot *cs = cs_set->clock_snapshots->pdata[i];
- BT_ASSERT(cs);
+ BT_ASSERT
_DBG
(cs);
if (cs->clock_class == cc) {
clock_snapshot = cs;
if (cs->clock_class == cc) {
clock_snapshot = cs;
@@
-130,11
+137,9
@@
int bt_clock_snapshot_set_set_clock_snapshot(struct bt_clock_snapshot_set *cs_se
if (!clock_snapshot) {
clock_snapshot = bt_clock_snapshot_create(cc);
if (!clock_snapshot) {
if (!clock_snapshot) {
clock_snapshot = bt_clock_snapshot_create(cc);
if (!clock_snapshot) {
-#ifdef BT_LIB_LOGE
-
BT_LIB_LOGE(
"Cannot create a clock snapshot from a clock class: "
+ BT_LIB_LOGE_APPEND_CAUSE(
+
"Cannot create a clock snapshot from a clock class: "
"%![cc-]+K", cc);
"%![cc-]+K", cc);
-#endif
-
ret = -1;
goto end;
}
ret = -1;
goto end;
}
@@
-152,8
+157,8
@@
static inline
void bt_clock_snapshot_set_set_default_clock_snapshot(
struct bt_clock_snapshot_set *cs_set, uint64_t raw_value)
{
void bt_clock_snapshot_set_set_default_clock_snapshot(
struct bt_clock_snapshot_set *cs_set, uint64_t raw_value)
{
- BT_ASSERT(cs_set);
- BT_ASSERT(cs_set->default_cs);
+ BT_ASSERT
_DBG
(cs_set);
+ BT_ASSERT
_DBG
(cs_set->default_cs);
bt_clock_snapshot_set_raw_value(cs_set->default_cs, raw_value);
}
bt_clock_snapshot_set_raw_value(cs_set->default_cs, raw_value);
}
This page took
0.026834 seconds
and
4
git commands to generate.