Generalize some ustcomm functionality
[ust.git] / libustd / lowlevel.c
index 62c8e6b0e095dd8acf40b068cefa696b1619486f..a8abf92bc7132071bea4f2a4ad359ac122e03efc 100644 (file)
@@ -19,9 +19,9 @@
 #include <assert.h>
 #include <byteswap.h>
 
+#include "ust/ustd.h"
 #include "buffers.h"
 #include "tracer.h"
-#include "libustd.h"
 #include "usterr.h"
 
 /* This truncates to an offset in the buffer. */
@@ -64,8 +64,6 @@ size_t subbuffer_data_size(void *subbuf)
 
 void finish_consuming_dead_subbuffer(struct libustd_callbacks *callbacks, struct buffer_info *buf)
 {
-       int result;
-
        struct ust_buffer *ustbuf = buf->bufstruct_mem;
 
        long write_offset = uatomic_read(&ustbuf->offset);
@@ -95,7 +93,6 @@ void finish_consuming_dead_subbuffer(struct libustd_callbacks *callbacks, struct
 
        /* Iterate on subbuffers to recover. */
        for(i_subbuf = first_subbuf % buf->n_subbufs; ; i_subbuf++, i_subbuf %= buf->n_subbufs) {
-               void *tmp;
                /* commit_seq is the offset in the buffer of the end of the last sequential commit.
                 * Bytes beyond this limit cannot be recovered. This is a free-running counter. */
                long commit_seq = uatomic_read(&ustbuf->commit_seq[i_subbuf]);
@@ -106,8 +103,6 @@ void finish_consuming_dead_subbuffer(struct libustd_callbacks *callbacks, struct
 
                struct ltt_subbuffer_header *header = (struct ltt_subbuffer_header *)((char *)buf->mem+i_subbuf*buf->subbuf_size);
 
-               int pad_size;
-
                if((commit_seq & commit_seq_mask) == 0) {
                        /* There is nothing to do. */
                        /* FIXME: is this needed? */
This page took 0.0238 seconds and 4 git commands to generate.