projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tap-driver.sh: flush stdout after each test result
[babeltrace.git]
/
plugins
/
utils
/
dummy
/
dummy.c
diff --git
a/plugins/utils/dummy/dummy.c
b/plugins/utils/dummy/dummy.c
index ecb58f570d0024ce15a236856668e65cb3559982..59d851521ab5e4af8dc6cdc7b4b5c5749cea447e 100644
(file)
--- a/
plugins/utils/dummy/dummy.c
+++ b/
plugins/utils/dummy/dummy.c
@@
-20,21
+20,24
@@
* SOFTWARE.
*/
* SOFTWARE.
*/
-#include <babeltrace/babeltrace.h>
-#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace
2
/babeltrace.h>
+#include <babeltrace
2
/babeltrace-internal.h>
#include <plugins-common.h>
#include <plugins-common.h>
-#include <babeltrace/assert-internal.h>
+#include <babeltrace
2
/assert-internal.h>
#include "dummy.h"
#include "dummy.h"
+static
+const char * const in_port_name = "in";
+
void destroy_private_dummy_data(struct dummy *dummy)
{
void destroy_private_dummy_data(struct dummy *dummy)
{
- bt_
object_put_ref(dummy->notif
_iter);
+ bt_
self_component_port_input_message_iterator_put_ref(dummy->msg
_iter);
g_free(dummy);
}
BT_HIDDEN
g_free(dummy);
}
BT_HIDDEN
-void dummy_finalize(
struct
bt_self_component_sink *comp)
+void dummy_finalize(bt_self_component_sink *comp)
{
struct dummy *dummy;
{
struct dummy *dummy;
@@
-46,11
+49,12
@@
void dummy_finalize(struct bt_self_component_sink *comp)
}
BT_HIDDEN
}
BT_HIDDEN
-enum bt_self_component_status dummy_init(
- struct bt_self_component_sink *component,
- struct bt_value *params, UNUSED_VAR void *init_method_data)
+bt_self_component_status dummy_init(
+ bt_self_component_sink *component,
+ const bt_value *params,
+ UNUSED_VAR void *init_method_data)
{
{
-
enum
bt_self_component_status ret;
+ bt_self_component_status ret;
struct dummy *dummy = g_new0(struct dummy, 1);
if (!dummy) {
struct dummy *dummy = g_new0(struct dummy, 1);
if (!dummy) {
@@
-76,73
+80,73
@@
end:
}
BT_HIDDEN
}
BT_HIDDEN
-enum bt_self_component_status dummy_port_connected(
- struct bt_self_component_sink *comp,
- struct bt_self_component_port_input *self_port,
- struct bt_port_output *other_port)
+bt_self_component_status dummy_graph_is_configured(
+ bt_self_component_sink *comp)
{
{
-
enum
bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
+ bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
struct dummy *dummy;
struct dummy *dummy;
-
struct bt_self_component_port_input_notification
_iterator *iterator;
+
bt_self_component_port_input_message
_iterator *iterator;
dummy = bt_self_component_get_data(
bt_self_component_sink_as_self_component(comp));
BT_ASSERT(dummy);
dummy = bt_self_component_get_data(
bt_self_component_sink_as_self_component(comp));
BT_ASSERT(dummy);
- iterator = bt_self_component_port_input_notification_iterator_create(
- self_port);
+ iterator = bt_self_component_port_input_message_iterator_create(
+ bt_self_component_sink_borrow_input_port_by_name(comp,
+ in_port_name));
if (!iterator) {
status = BT_SELF_COMPONENT_STATUS_NOMEM;
goto end;
}
if (!iterator) {
status = BT_SELF_COMPONENT_STATUS_NOMEM;
goto end;
}
- BT_OBJECT_MOVE_REF(dummy->notif_iter, iterator);
+ BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_MOVE_REF(
+ dummy->msg_iter, iterator);
end:
return status;
}
BT_HIDDEN
end:
return status;
}
BT_HIDDEN
-
enum
bt_self_component_status dummy_consume(
-
struct
bt_self_component_sink *component)
+bt_self_component_status dummy_consume(
+ bt_self_component_sink *component)
{
{
-
enum
bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
- bt_
notification_array notif
s;
+ bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
+ bt_
message_array_const msg
s;
uint64_t count;
struct dummy *dummy;
uint64_t count;
struct dummy *dummy;
-
enum bt_notification
_iterator_status it_ret;
+
bt_message
_iterator_status it_ret;
uint64_t i;
dummy = bt_self_component_get_data(
bt_self_component_sink_as_self_component(component));
BT_ASSERT(dummy);
uint64_t i;
dummy = bt_self_component_get_data(
bt_self_component_sink_as_self_component(component));
BT_ASSERT(dummy);
- if (unlikely(!dummy->
notif
_iter)) {
+ if (unlikely(!dummy->
msg
_iter)) {
ret = BT_SELF_COMPONENT_STATUS_END;
goto end;
}
ret = BT_SELF_COMPONENT_STATUS_END;
goto end;
}
- /* Consume one
notification
*/
- it_ret = bt_self_component_port_input_
notification
_iterator_next(
- dummy->
notif_iter, ¬if
s, &count);
+ /* Consume one
message
*/
+ it_ret = bt_self_component_port_input_
message
_iterator_next(
+ dummy->
msg_iter, &msg
s, &count);
switch (it_ret) {
switch (it_ret) {
- case BT_
NOTIFICATION
_ITERATOR_STATUS_OK:
+ case BT_
MESSAGE
_ITERATOR_STATUS_OK:
ret = BT_SELF_COMPONENT_STATUS_OK;
for (i = 0; i < count; i++) {
ret = BT_SELF_COMPONENT_STATUS_OK;
for (i = 0; i < count; i++) {
- bt_
object_put_ref(notif
s[i]);
+ bt_
message_put_ref(msg
s[i]);
}
break;
}
break;
- case BT_
NOTIFICATION
_ITERATOR_STATUS_AGAIN:
+ case BT_
MESSAGE
_ITERATOR_STATUS_AGAIN:
ret = BT_SELF_COMPONENT_STATUS_AGAIN;
goto end;
ret = BT_SELF_COMPONENT_STATUS_AGAIN;
goto end;
- case BT_
NOTIFICATION
_ITERATOR_STATUS_END:
+ case BT_
MESSAGE
_ITERATOR_STATUS_END:
ret = BT_SELF_COMPONENT_STATUS_END;
goto end;
ret = BT_SELF_COMPONENT_STATUS_END;
goto end;
- case BT_
NOTIFICATION
_ITERATOR_STATUS_ERROR:
+ case BT_
MESSAGE
_ITERATOR_STATUS_ERROR:
ret = BT_SELF_COMPONENT_STATUS_ERROR;
goto end;
ret = BT_SELF_COMPONENT_STATUS_ERROR;
goto end;
- case BT_
NOTIFICATION
_ITERATOR_STATUS_NOMEM:
+ case BT_
MESSAGE
_ITERATOR_STATUS_NOMEM:
ret = BT_SELF_COMPONENT_STATUS_NOMEM;
goto end;
default:
ret = BT_SELF_COMPONENT_STATUS_NOMEM;
goto end;
default:
This page took
0.025848 seconds
and
4
git commands to generate.