#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "wrapper/random.h"
#include "wrapper/tracepoint.h"
+#include "lttng-kernel-version.h"
#include "lttng-events.h"
#include "lttng-tracer.h"
#include "lttng-abi-old.h"
void synchronize_trace(void)
{
synchronize_sched();
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#ifdef CONFIG_PREEMPT_RT_FULL
+ synchronize_rcu();
+#endif
+#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */
#ifdef CONFIG_PREEMPT_RT
synchronize_rcu();
#endif
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */
}
struct lttng_session *lttng_session_create(void)
goto nomem;
chan->session = session;
chan->id = session->free_chan_id++;
+ chan->ops = &transport->ops;
/*
* Note: the channel creation op already writes into the packet
* headers. Therefore the "chan" information used as input
if (!chan->chan)
goto create_error;
chan->enabled = 1;
- chan->ops = &transport->ops;
chan->transport = transport;
chan->channel_type = channel_type;
list_add(&chan->list, &session->chan);
break;
default:
WARN_ON_ONCE(1);
+ goto register_error;
}
ret = _lttng_event_metadata_statedump(chan->session, chan, event);
if (ret)
* sessions_mutex), so we can do racy operations such as looking for
* remaining space left in packet and write, since mutual exclusion
* protects us from concurrent writes.
+ * Returns the number of bytes written in the channel, 0 if no data
+ * was written and a negative value on error.
*/
int lttng_metadata_output_channel(struct lttng_metadata_stream *stream,
struct channel *chan)
MODULE_LICENSE("GPL and additional rights");
MODULE_AUTHOR("Mathieu Desnoyers <mathieu.desnoyers@efficios.com>");
MODULE_DESCRIPTION("LTTng Events");
+MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "."
+ __stringify(LTTNG_MODULES_MINOR_VERSION) "."
+ __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION));