#define _LGPL_SOURCE
-#include <common/common.h>
-#include <common/utils.h>
-#include <common/compat/endian.h>
+#include <common/common.hpp>
+#include <common/utils.hpp>
+#include <common/compat/endian.hpp>
-#include "lttng-relayd.h"
-#include "stream.h"
-#include "index.h"
-#include "connection.h"
+#include "lttng-relayd.hpp"
+#include "stream.hpp"
+#include "index.hpp"
+#include "connection.hpp"
/*
* Allocate a new relay index object. Pass the stream in which it is
struct cds_lfht_node *node_ptr;
struct relay_index *_index;
+ ASSERT_RCU_READ_LOCKED();
+
DBG2("Adding relay index with stream id %" PRIu64 " and seqnum %" PRIu64,
stream->stream_handle, index->index_n.key);
*/
static bool relay_index_get(struct relay_index *index)
{
+ ASSERT_RCU_READ_LOCKED();
+
DBG2("index get for stream id %" PRIu64 " and seqnum %" PRIu64 " refcount %d",
index->stream->stream_handle, index->index_n.key,
(int) index->ref.refcount);
index->stream->stream_handle, index->index_n.key,
(int) index->ref.refcount);
/*
- * Ensure existance of index->lock for index unlock.
+ * Ensure existence of index->lock for index unlock.
*/
rcu_read_lock();
/*