X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libust%2Fbuffers.c;h=ac34e5fa5f3102de5fc93dd7c1833d586c578b6a;hb=518d7abb8e3720433c611499f704c3bd9d554102;hp=8cadeabf4207699473cbdadfc38c10da2c03d0f1;hpb=17bb07b445acdef0034194bdcebe113988a8db60;p=ust.git diff --git a/libust/buffers.c b/libust/buffers.c index 8cadeab..ac34e5f 100644 --- a/libust/buffers.c +++ b/libust/buffers.c @@ -25,8 +25,10 @@ #include #include #include -#include #include + +#include + #include "buffers.h" #include "channels.h" #include "tracer.h" @@ -635,12 +637,6 @@ static int ust_buffers_init_buffer(struct ust_trace *trace, buf->data_ready_fd_read = fds[0]; buf->data_ready_fd_write = fds[1]; - /* FIXME: do we actually need this? */ - result = fcntl(fds[0], F_SETFL, O_NONBLOCK); - if(result == -1) { - PERROR("fcntl"); - } - //ust// buf->commit_seq = malloc(sizeof(buf->commit_seq) * n_subbufs); //ust// if(!ltt_buf->commit_seq) { //ust// return -1; @@ -1219,12 +1215,14 @@ static int ltt_relay_try_reserve_slow(struct ust_channel *chan, struct ust_buffe * Return : -ENOSPC if not enough space, else returns 0. * It will take care of sub-buffer switching. */ -int ltt_reserve_slot_lockless_slow(struct ust_trace *trace, - struct ust_channel *chan, void **transport_data, - size_t data_size, size_t *slot_size, long *buf_offset, u64 *tsc, - unsigned int *rflags, int largest_align, int cpu) +int ltt_reserve_slot_lockless_slow(struct ust_channel *chan, + struct ust_trace *trace, size_t data_size, + int largest_align, int cpu, + struct ust_buffer **ret_buf, + size_t *slot_size, long *buf_offset, + u64 *tsc, unsigned int *rflags) { - struct ust_buffer *buf = chan->buf[cpu]; + struct ust_buffer *buf = *ret_buf = chan->buf[cpu]; struct ltt_reserve_switch_offsets offsets; offsets.size = 0; @@ -1302,8 +1300,7 @@ static void __attribute__((destructor)) ust_buffers_exit(void) ltt_transport_unregister(&ust_relay_transport); } -size_t ltt_write_event_header_slow(struct ust_trace *trace, - struct ust_channel *channel, +size_t ltt_write_event_header_slow(struct ust_channel *channel, struct ust_buffer *buf, long buf_offset, u16 eID, u32 event_size, u64 tsc, unsigned int rflags)