projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: strictly type function return status enumerations
[babeltrace.git]
/
src
/
lib
/
trace-ir
/
trace.c
diff --git
a/src/lib/trace-ir/trace.c
b/src/lib/trace-ir/trace.c
index 3c0308386c4be8ab0ab6e475334fa1a7884215ef..fdaa7bad1a6627f241e2fe02634242ea10997787 100644
(file)
--- a/
src/lib/trace-ir/trace.c
+++ b/
src/lib/trace-ir/trace.c
@@
-55,6
+55,7
@@
#include "trace-class.h"
#include "trace.h"
#include "utils.h"
#include "trace-class.h"
#include "trace.h"
#include "utils.h"
+#include "lib/func-status.h"
struct bt_trace_destruction_listener_elem {
bt_trace_destruction_listener_func func;
struct bt_trace_destruction_listener_elem {
bt_trace_destruction_listener_func func;
@@
-191,7
+192,8
@@
const char *bt_trace_get_name(const struct bt_trace *trace)
return trace->name.value;
}
return trace->name.value;
}
-enum bt_trace_status bt_trace_set_name(struct bt_trace *trace, const char *name)
+enum bt_trace_set_name_status bt_trace_set_name(struct bt_trace *trace,
+ const char *name)
{
BT_ASSERT_PRE_NON_NULL(trace, "Trace");
BT_ASSERT_PRE_NON_NULL(name, "Name");
{
BT_ASSERT_PRE_NON_NULL(trace, "Trace");
BT_ASSERT_PRE_NON_NULL(name, "Name");
@@
-199,7
+201,7
@@
enum bt_trace_status bt_trace_set_name(struct bt_trace *trace, const char *name)
g_string_assign(trace->name.str, name);
trace->name.value = trace->name.str->str;
BT_LIB_LOGD("Set trace's name: %!+t", trace);
g_string_assign(trace->name.str, name);
trace->name.value = trace->name.str->str;
BT_LIB_LOGD("Set trace's name: %!+t", trace);
- return BT_
TRACE
_STATUS_OK;
+ return BT_
FUNC
_STATUS_OK;
}
uint64_t bt_trace_get_stream_count(const struct bt_trace *trace)
}
uint64_t bt_trace_get_stream_count(const struct bt_trace *trace)
@@
-250,7
+252,7
@@
const struct bt_stream *bt_trace_borrow_stream_by_id_const(
return bt_trace_borrow_stream_by_id((void *) trace, id);
}
return bt_trace_borrow_stream_by_id((void *) trace, id);
}
-enum bt_trace_status bt_trace_add_destruction_listener(
+enum bt_trace_
add_listener_
status bt_trace_add_destruction_listener(
const struct bt_trace *c_trace,
bt_trace_destruction_listener_func listener,
void *data, uint64_t *listener_id)
const struct bt_trace *c_trace,
bt_trace_destruction_listener_func listener,
void *data, uint64_t *listener_id)
@@
-288,7
+290,7
@@
enum bt_trace_status bt_trace_add_destruction_listener(
BT_LIB_LOGD("Added destruction listener: " "%![trace-]+t, "
"listener-id=%" PRIu64, trace, i);
BT_LIB_LOGD("Added destruction listener: " "%![trace-]+t, "
"listener-id=%" PRIu64, trace, i);
- return BT_
TRACE
_STATUS_OK;
+ return BT_
FUNC
_STATUS_OK;
}
BT_ASSERT_PRE_FUNC
}
BT_ASSERT_PRE_FUNC
@@
-301,7
+303,7
@@
bool has_listener_id(const struct bt_trace *trace, uint64_t listener_id)
listener_id))->func != NULL;
}
listener_id))->func != NULL;
}
-enum bt_trace_status bt_trace_remove_destruction_listener(
+enum bt_trace_
remove_listener_
status bt_trace_remove_destruction_listener(
const struct bt_trace *c_trace, uint64_t listener_id)
{
struct bt_trace *trace = (void *) c_trace;
const struct bt_trace *c_trace, uint64_t listener_id)
{
struct bt_trace *trace = (void *) c_trace;
@@
-321,7
+323,7
@@
enum bt_trace_status bt_trace_remove_destruction_listener(
BT_LIB_LOGD("Removed \"trace destruction listener: "
"%![trace-]+t, listener-id=%" PRIu64,
trace, listener_id);
BT_LIB_LOGD("Removed \"trace destruction listener: "
"%![trace-]+t, listener-id=%" PRIu64,
trace, listener_id);
- return BT_
TRACE
_STATUS_OK;
+ return BT_
FUNC
_STATUS_OK;
}
BT_HIDDEN
}
BT_HIDDEN
This page took
0.02515 seconds
and
4
git commands to generate.