X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=libust%2Fltt-events.c;h=e4ffc69a32474b9fdd45331e893770ee399ba5b7;hb=8d8a24c8565ce6dce7e7bd1045a95d1d2af5e536;hp=f048e27817a69cb9f1aee3c23f41c4d1360341a7;hpb=2432c3c9bdce3c94632f7c619165ab1278a69551;p=lttng-ust.git diff --git a/libust/ltt-events.c b/libust/ltt-events.c index f048e278..e4ffc69a 100644 --- a/libust/ltt-events.c +++ b/libust/ltt-events.c @@ -25,6 +25,7 @@ #include "ust/core.h" #include "ltt-tracer.h" #include "ust/wait.h" +#include "../libringbuffer/shm.h" static CDS_LIST_HEAD(sessions); static CDS_LIST_HEAD(ltt_transport_list); @@ -215,15 +216,15 @@ struct ltt_channel *ltt_channel_create(struct ltt_session *session, goto nomem; chan->session = session; chan->id = session->free_chan_id++; - //chan->shmid = shmget(getpid(), shmlen, IPC_CREAT | IPC_EXCL | 0700); /* * Note: the channel creation op already writes into the packet * headers. Therefore the "chan" information used as input * should be already accessible. */ - chan->chan = transport->ops.channel_create("[lttng]", chan, buf_addr, + chan->handle = transport->ops.channel_create("[lttng]", chan, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, - read_timer_interval, shmid); + read_timer_interval); + chan->chan = shmp(chan->handle->header->chan); if (!chan->chan) goto create_error; chan->enabled = 1; @@ -247,7 +248,7 @@ active: static void _ltt_channel_destroy(struct ltt_channel *chan) { - chan->ops->channel_destroy(chan->chan); + chan->ops->channel_destroy(chan->handle); cds_list_del(&chan->list); lttng_destroy_context(chan->ctx); free(chan);