A frozen notification cannot be modified (except for its reference
count). Currently, no notification can be modified after its creation
anyway, but we're excepting some.
The notification is frozen by bt_notification_iterator_next() when the
component's "next" method is successful.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
* SOFTWARE.
*/
+#include <stdbool.h>
#include <babeltrace/ref-internal.h>
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/object-internal.h>
struct bt_object base;
enum bt_notification_type type;
get_stream_func get_stream;
+ bool frozen;
};
BT_HIDDEN
enum bt_notification_type type,
bt_object_release_func release);
+BT_HIDDEN
+static inline void bt_notification_freeze(struct bt_notification *notification)
+{
+ notification->frozen = true;
+}
+
#ifdef __cplusplus
}
#endif
/** End of trace notification, see eot.h */
BT_NOTIFICATION_TYPE_END_OF_TRACE = 8,
+ BT_NOTIFICATION_TYPE_INACTIVITY = 9,
+
BT_NOTIFICATION_TYPE_NR, /* Not part of ABI. */
};
#include <babeltrace/graph/component-class-internal.h>
#include <babeltrace/graph/notification-iterator.h>
#include <babeltrace/graph/notification-iterator-internal.h>
+#include <babeltrace/graph/notification-internal.h>
static
void bt_notification_iterator_destroy(struct bt_object *obj)
BT_MOVE(iterator->current_notification,
next_return.notification);
+ bt_notification_freeze(iterator->current_notification);
}
end: