fix 64 bits
[lttv.git] / ltt-usertrace / ltt-usertrace-fast.c
index 1364d3bb6a0a15c1fa0f15620ffccf2b104ba116..ba0a2ae9450cbd7e195f283137a645db4f403d44 100644 (file)
@@ -66,7 +66,7 @@
 #include <sys/time.h>
 #include <errno.h>
 
-#include <asm/atomic.h>
+// included with hack for powerpc in ltt-usertrace.h #include <asm/atomic.h>
 #include <asm/timex.h> //for get_cycles()
 
 _syscall0(pid_t,gettid)
@@ -205,7 +205,7 @@ static void flush_buffer(struct ltt_buf *ltt_buf, enum force_switch_mode mode)
                                 index in the buffer being the one which will win this loop. */
                        /* If the buffer is not in overwrite mode, pushing the reader only
                                 happen if a sub-buffer is corrupted */
-                       if((SUBBUF_TRUNC(offset_end, ltt_buf) 
+                       if((SUBBUF_TRUNC(offset_end-1, ltt_buf) 
                                        - SUBBUF_TRUNC(consumed_old, ltt_buf)) 
                                                        >= ltt_buf->alloc_size)
                                consumed_new = SUBBUF_ALIGN(consumed_old, ltt_buf);
This page took 0.023452 seconds and 4 git commands to generate.