From ac6013419b8053b1a865bc9aab4656e81685ef2e Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 11 Oct 2021 15:46:49 +0200 Subject: [PATCH] Replace class by category to avoid C++ problems --- dump.c | 2 +- emu.c | 4 ++-- emu_nosv.c | 2 +- emu_nosv_ss.c | 2 +- emu_ovni.c | 6 +++--- ovni.c | 2 +- ovni.h | 2 +- ovni2prv.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dump.c b/dump.c index 703f273..3c7c0ad 100644 --- a/dump.c +++ b/dump.c @@ -45,7 +45,7 @@ void emit(struct ovni_stream *stream, struct ovni_ev *ev) printf("%d.%d.%d %c %c %c % 20ld % 15ld ", stream->loom, stream->proc, stream->tid, - ev->header.model, ev->header.class, ev->header.value, clock, delta); + ev->header.model, ev->header.category, ev->header.value, clock, delta); payloadsize = ovni_payload_size(ev); for(i=0; i>> %d.%d.%d %c %c %c % 20ld % 15ld ", stream->loom, stream->proc, stream->tid, - ev->header.model, ev->header.class, ev->header.value, clock, delta); + ev->header.model, ev->header.category, ev->header.value, clock, delta); payloadsize = ovni_payload_size(ev); for(i=0; iheader.flags = 0; ev->header.model = mcv[0]; - ev->header.class = mcv[1]; + ev->header.category = mcv[1]; ev->header.value = mcv[2]; ev->header.clock = emu->cur_ev->header.clock; diff --git a/emu_nosv.c b/emu_nosv.c index 415b0d7..1fe9e88 100644 --- a/emu_nosv.c +++ b/emu_nosv.c @@ -422,7 +422,7 @@ hook_pre_nosv(struct ovni_emu *emu) { assert(emu->cur_ev->header.model == 'V'); - switch(emu->cur_ev->header.class) + switch(emu->cur_ev->header.category) { case 'T': pre_task(emu); break; case 'Y': pre_type(emu); break; diff --git a/emu_nosv_ss.c b/emu_nosv_ss.c index e0714f0..05d8935 100644 --- a/emu_nosv_ss.c +++ b/emu_nosv_ss.c @@ -111,7 +111,7 @@ hook_pre_nosv_ss(struct ovni_emu *emu) { assert(emu->cur_ev->header.model == 'V'); - switch(emu->cur_ev->header.class) + switch(emu->cur_ev->header.category) { case 'S': pre_sched(emu); break; case 'U': pre_submit(emu); break; diff --git a/emu_ovni.c b/emu_ovni.c index 3159665..3be97cd 100644 --- a/emu_ovni.c +++ b/emu_ovni.c @@ -549,14 +549,14 @@ hook_pre_ovni(struct ovni_emu *emu) if(emu->cur_ev->header.model != 'O') return; - switch(emu->cur_ev->header.class) + switch(emu->cur_ev->header.category) { case 'H': pre_thread(emu); break; case 'A': pre_affinity(emu); break; case 'B': pre_burst(emu); break; default: - dbg("unknown ovni event class %c\n", - emu->cur_ev->header.class); + dbg("unknown ovni event category %c\n", + emu->cur_ev->header.category); break; } diff --git a/ovni.c b/ovni.c index b43d540..97df6ab 100644 --- a/ovni.c +++ b/ovni.c @@ -411,7 +411,7 @@ void ovni_ev_set_mcv(struct ovni_ev *ev, char *mcv) { ev->header.model = mcv[0]; - ev->header.class = mcv[1]; + ev->header.category = mcv[1]; ev->header.value = mcv[2]; } diff --git a/ovni.h b/ovni.h index 9f7cc1f..5992daa 100644 --- a/ovni.h +++ b/ovni.h @@ -51,7 +51,7 @@ struct __attribute__((__packed__)) ovni_ev_header { /* first 4 bits reserved, last 4 for payload size */ uint8_t flags; uint8_t model; - uint8_t class; + uint8_t category; uint8_t value; uint64_t clock; }; diff --git a/ovni2prv.c b/ovni2prv.c index e74b758..ad29587 100644 --- a/ovni2prv.c +++ b/ovni2prv.c @@ -31,7 +31,7 @@ void emit(struct ovni_stream *stream, struct ovni_ev *ev, int row) //2:0:1:1:7:1542091:6400025:1 //2:0:1:1:7:1542091:6400017:0 - printf("2:0:1:1:%d:%ld:%d:%d\n", row, delta, ev->header.class, ev->header.value); + printf("2:0:1:1:%d:%ld:%d:%d\n", row, delta, ev->header.category, ev->header.value); } void dump_events(struct ovni_trace *trace)