{
struct tracing_ctx *tracing_ctx = data;
- uint64_t low = (uint64_t) ((uint32_t) -e_ctimer_get(E_CTIMER_1));
+ uint64_t low = (uint64_t) ((uint32_t)(E_CTIMER_MAX-e_ctimer_get(E_CTIMER_1)));
return tracing_ctx->clock_high | low;
}
{
struct tracing_ctx *tracing_ctx = data;
int check_shared = 0;
- int full;
+ int full = 0;
/* are we in a back-end checking waiting period? */
if (tracing_ctx->backend_wait_period) {
* buffer) for this packet, so "upload" it to shared memory now.
*/
index = get_prod_index(tracing_ctx) & (RINGBUF_SZ - 1);
- dst = (void *) tracing_ctx->ringbuf->packets[index];
+ dst = (void *) &(tracing_ctx->ringbuf->packets[index]);
memcpy(dst, tracing_ctx->local_packet, PACKET_SZ);
/* update producer index after copy */