From e8f4060370ba84cb1f2b1fc5ec7fb01438426529 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 21 Oct 2021 15:55:40 +0200 Subject: [PATCH] Add raw autocpu prv emit function --- prv.c | 20 ++++++++++++++++---- prv.h | 3 +++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/prv.c b/prv.c index 909d058..caa5c74 100644 --- a/prv.c +++ b/prv.c @@ -24,13 +24,19 @@ prv_ev_thread(struct ovni_emu *emu, int row, int type, int val) } void -prv_ev_cpu(struct ovni_emu *emu, int row, int type, int val) +prv_ev_cpu_raw(struct ovni_emu *emu, int row, int64_t time, int type, int val) { - prv_ev(emu->prv_cpu, row, emu->delta_time, type, val); + prv_ev(emu->prv_cpu, row, time, type, val); } void -prv_ev_autocpu(struct ovni_emu *emu, int type, int val) +prv_ev_cpu(struct ovni_emu *emu, int row, int type, int val) +{ + prv_ev_cpu_raw(emu, row, emu->delta_time, type, val); +} + +void +prv_ev_autocpu_raw(struct ovni_emu *emu, int64_t time, int type, int val) { int row; struct ovni_cpu *cpu; @@ -45,7 +51,13 @@ prv_ev_autocpu(struct ovni_emu *emu, int type, int val) /* Begin at 1 */ row = emu->cur_loom->offset_ncpus + cpu->i + 1; - prv_ev_cpu(emu, row, type, val); + prv_ev_cpu_raw(emu, row, time, type, val); +} + +void +prv_ev_autocpu(struct ovni_emu *emu, int type, int val) +{ + prv_ev_autocpu_raw(emu, emu->delta_time, type, val); } void diff --git a/prv.h b/prv.h index eea6a50..565911e 100644 --- a/prv.h +++ b/prv.h @@ -37,6 +37,9 @@ prv_ev_cpu(struct ovni_emu *emu, int row, int type, int val); void prv_ev_autocpu(struct ovni_emu *emu, int type, int val); +void +prv_ev_autocpu_raw(struct ovni_emu *emu, int64_t time, int type, int val); + void prv_header(FILE *f, int nrows);