projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: add internal object pool API and use it; adapt plugins/tests
[babeltrace.git]
/
include
/
babeltrace
/
graph
/
notification-internal.h
diff --git
a/include/babeltrace/graph/notification-internal.h
b/include/babeltrace/graph/notification-internal.h
index 00a8c7eeb7e9e148e0c5fd7915d916c6722cc239..2fbdbb42cbc1ab38a0ec7c2f259b44756027f2a1 100644
(file)
--- a/
include/babeltrace/graph/notification-internal.h
+++ b/
include/babeltrace/graph/notification-internal.h
@@
-1,5
+1,5
@@
-#ifndef BABELTRACE_
COMPONENT
_NOTIFICATION_NOTIFICATION_INTERNAL_H
-#define BABELTRACE_
COMPONENT
_NOTIFICATION_NOTIFICATION_INTERNAL_H
+#ifndef BABELTRACE_
GRAPH
_NOTIFICATION_NOTIFICATION_INTERNAL_H
+#define BABELTRACE_
GRAPH
_NOTIFICATION_NOTIFICATION_INTERNAL_H
/*
* BabelTrace - Plug-in Notification internal
/*
* BabelTrace - Plug-in Notification internal
@@
-34,16
+34,23
@@
#include <babeltrace/ctf-ir/stream.h>
#include <babeltrace/types.h>
#include <babeltrace/ctf-ir/stream.h>
#include <babeltrace/types.h>
-typedef struct bt_
ctf_
stream *(*get_stream_func)(
+typedef struct bt_stream *(*get_stream_func)(
struct bt_notification *notification);
struct bt_notification {
struct bt_object base;
enum bt_notification_type type;
get_stream_func get_stream;
struct bt_notification *notification);
struct bt_notification {
struct bt_object base;
enum bt_notification_type type;
get_stream_func get_stream;
+ uint64_t seq_num;
bt_bool frozen;
};
bt_bool frozen;
};
+#define BT_ASSERT_PRE_NOTIF_IS_TYPE(_notif, _type) \
+ BT_ASSERT_PRE((_notif)->type == (_type), \
+ "Notification has the wrong type: expected-type=%s, " \
+ "%![notif-]+n", bt_notification_type_string(_type), \
+ (_notif))
+
BT_HIDDEN
void bt_notification_init(struct bt_notification *notification,
enum bt_notification_type type,
BT_HIDDEN
void bt_notification_init(struct bt_notification *notification,
enum bt_notification_type type,
@@
-58,12
+65,8
@@
static inline
const char *bt_notification_type_string(enum bt_notification_type type)
{
switch (type) {
const char *bt_notification_type_string(enum bt_notification_type type)
{
switch (type) {
- case BT_NOTIFICATION_TYPE_SENTINEL:
- return "BT_NOTIFICATION_TYPE_SENTINEL";
case BT_NOTIFICATION_TYPE_UNKNOWN:
return "BT_NOTIFICATION_TYPE_UNKNOWN";
case BT_NOTIFICATION_TYPE_UNKNOWN:
return "BT_NOTIFICATION_TYPE_UNKNOWN";
- case BT_NOTIFICATION_TYPE_ALL:
- return "BT_NOTIFICATION_TYPE_ALL";
case BT_NOTIFICATION_TYPE_EVENT:
return "BT_NOTIFICATION_TYPE_EVENT";
case BT_NOTIFICATION_TYPE_INACTIVITY:
case BT_NOTIFICATION_TYPE_EVENT:
return "BT_NOTIFICATION_TYPE_EVENT";
case BT_NOTIFICATION_TYPE_INACTIVITY:
@@
-76,9
+79,13
@@
const char *bt_notification_type_string(enum bt_notification_type type)
return "BT_NOTIFICATION_TYPE_PACKET_BEGIN";
case BT_NOTIFICATION_TYPE_PACKET_END:
return "BT_NOTIFICATION_TYPE_PACKET_END";
return "BT_NOTIFICATION_TYPE_PACKET_BEGIN";
case BT_NOTIFICATION_TYPE_PACKET_END:
return "BT_NOTIFICATION_TYPE_PACKET_END";
+ case BT_NOTIFICATION_TYPE_DISCARDED_EVENTS:
+ return "BT_NOTIFICATION_TYPE_DISCARDED_EVENTS";
+ case BT_NOTIFICATION_TYPE_DISCARDED_PACKETS:
+ return "BT_NOTIFICATION_TYPE_DISCARDED_PACKETS";
default:
return "(unknown)";
}
}
default:
return "(unknown)";
}
}
-#endif /* BABELTRACE_
COMPONENT
_NOTIFICATION_NOTIFICATION_INTERNAL_H */
+#endif /* BABELTRACE_
GRAPH
_NOTIFICATION_NOTIFICATION_INTERNAL_H */
This page took
0.026037 seconds
and
4
git commands to generate.