#define _LTT_USERTRACE_FAST_H
#ifdef LTT_TRACE
+#ifdef LTT_TRACE_FAST
#include <errno.h>
-#include <asm/atomic.h>
#include <pthread.h>
#include <stdint.h>
#include <syscall.h>
#include <signal.h>
#include <ltt/ltt-facility-id-user_generic.h>
-#include <ltt/ltt-generic.h>
#ifndef LTT_N_SUBBUFS
#define LTT_N_SUBBUFS 2
#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
#endif //atomic_cmpxchg
-typedef unsigned int ltt_facility_t;
-
struct ltt_trace_header {
uint32_t magic_number;
uint32_t arch_type;
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);
}
+#endif //LTT_TRACE_FAST
#endif //LTT_TRACE
-
-
#endif //_LTT_USERTRACE_FAST_H