#include <sys/types.h>
#include <unistd.h>
-#include <ust/lttng-ust-ctl.h>
#include <lttng-sessiond-comm.h>
#include <lttng/lttng-ustconsumer.h>
+#include <lttng/ust-ctl.h>
#include <lttngerr.h>
extern struct lttng_consumer_global_data consumer_data;
int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan)
{
- struct object_data obj;
+ struct lttng_ust_object_data obj;
obj.handle = -1;
obj.shm_fd = chan->shm_fd;
if (!chan->handle) {
return -ENOMEM;
}
+ /*
+ * The channel fds are passed to ustctl, we only keep a copy.
+ */
+ chan->shm_fd_is_copy = 1;
+ chan->wait_fd_is_copy = 1;
+
return 0;
}
int lttng_ustconsumer_allocate_stream(struct lttng_consumer_stream *stream)
{
- struct object_data obj;
+ struct lttng_ust_object_data obj;
int ret;
obj.handle = -1;
if (!stream->mmap_base) {
return -EINVAL;
}
+ /*
+ * The stream fds are passed to ustctl, we only keep a copy.
+ */
+ stream->shm_fd_is_copy = 1;
+ stream->wait_fd_is_copy = 1;
+
return 0;
}