projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make tracectl destructor aware of fork status
[ust.git]
/
libust
/
buffers.h
diff --git
a/libust/buffers.h
b/libust/buffers.h
index 63449d6c024194fca1341769083a55cdfb93ff4b..a2ad83efca42884b1bba21e1674d14f304b52135 100644
(file)
--- a/
libust/buffers.h
+++ b/
libust/buffers.h
@@
-82,6
+82,11
@@
struct ust_buffer {
int data_ready_fd_write;
/* the reading end of the pipe */
int data_ready_fd_read;
int data_ready_fd_write;
/* the reading end of the pipe */
int data_ready_fd_read;
+ /*
+ * List of buffers with an open pipe, used for fork and forced subbuffer
+ * switch.
+ */
+ struct list_head open_buffers_list;
unsigned int finalized;
//ust// struct timer_list switch_timer; /* timer for periodical switch */
unsigned int finalized;
//ust// struct timer_list switch_timer; /* timer for periodical switch */
@@
-96,7
+101,7
@@
struct ust_buffer {
unsigned int cpu;
/* commit count per subbuffer; must be at end of struct */
unsigned int cpu;
/* commit count per subbuffer; must be at end of struct */
- long commit_seq[0]
____cacheline_aligned
; /* ATOMIC */
+ long commit_seq[0]; /* ATOMIC */
} ____cacheline_aligned;
/*
} ____cacheline_aligned;
/*
@@
-522,7
+527,8
@@
static __inline__ int ust_buffers_write(struct ust_buffer *buf, size_t offset,
size_t buf_offset = BUFFER_OFFSET(offset, buf->chan);
assert(buf_offset < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
size_t buf_offset = BUFFER_OFFSET(offset, buf->chan);
assert(buf_offset < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
- assert(buf_offset + len < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
+ assert(buf_offset + len
+ <= buf->chan->subbuf_size*buf->chan->subbuf_cnt);
ust_buffers_do_copy(buf->buf_data + buf_offset, src, len);
ust_buffers_do_copy(buf->buf_data + buf_offset, src, len);
@@
-590,7
+596,8
@@
int ust_buffers_strncpy(struct ust_buffer *buf, size_t offset, const void *src,
int terminated;
assert(buf_offset < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
int terminated;
assert(buf_offset < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
- assert(buf_offset + len < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
+ assert(buf_offset + len
+ <= buf->chan->subbuf_size*buf->chan->subbuf_cnt);
copied = ust_buffers_do_strncpy(buf->buf_data + buf_offset,
src, len, &terminated);
copied = ust_buffers_do_strncpy(buf->buf_data + buf_offset,
src, len, &terminated);
This page took
0.023744 seconds
and
4
git commands to generate.