From 6f8b46e75306da90a075f1102043622f0968b3e0 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Tue, 19 Oct 2021 10:13:57 +0200 Subject: [PATCH] Rename channel NTHREADS by NRTHREADS --- emu.h | 4 ++-- emu_ovni.c | 10 +++++----- pcf.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/emu.h b/emu.h index 7429919..0c10c54 100644 --- a/emu.h +++ b/emu.h @@ -111,7 +111,7 @@ enum chan_track { enum chan { CHAN_OVNI_PID, CHAN_OVNI_TID, - CHAN_OVNI_NTHREADS, + CHAN_OVNI_NRTHREADS, CHAN_OVNI_STATE, CHAN_OVNI_APPID, CHAN_OVNI_CPU, @@ -138,7 +138,7 @@ static const int chan_to_prvtype[CHAN_MAX][3] = { /* Channel TH CPU */ { CHAN_OVNI_PID, 10, 60 }, { CHAN_OVNI_TID, 11, 61 }, - { CHAN_OVNI_NTHREADS, -1, 62 }, + { CHAN_OVNI_NRTHREADS, -1, 62 }, { CHAN_OVNI_STATE, 13, -1 }, { CHAN_OVNI_APPID, 14, 64 }, /* Not used */ { CHAN_OVNI_CPU, 15, -1 }, diff --git a/emu_ovni.c b/emu_ovni.c index b94e9a8..f3c0fa6 100644 --- a/emu_ovni.c +++ b/emu_ovni.c @@ -47,7 +47,7 @@ hook_init_ovni(struct ovni_emu *emu) chan_cpu_init(cpu, ucpu, CHAN_OVNI_TID, CHAN_TRACK_TH_RUNNING, row, prv_cpu, clock); chan_cpu_init(cpu, ucpu, CHAN_OVNI_PID, CHAN_TRACK_TH_RUNNING, row, prv_cpu, clock); - chan_cpu_init(cpu, ucpu, CHAN_OVNI_NTHREADS, CHAN_TRACK_NONE, row, prv_cpu, clock); + chan_cpu_init(cpu, ucpu, CHAN_OVNI_NRTHREADS, CHAN_TRACK_NONE, row, prv_cpu, clock); /* FIXME: Use extended initialization for CPUs too */ chan_enable(&cpu->chan[CHAN_OVNI_TID], 1); @@ -56,8 +56,8 @@ hook_init_ovni(struct ovni_emu *emu) chan_enable(&cpu->chan[CHAN_OVNI_PID], 1); chan_set(&cpu->chan[CHAN_OVNI_PID], 0); - chan_enable(&cpu->chan[CHAN_OVNI_NTHREADS], 1); - chan_set(&cpu->chan[CHAN_OVNI_NTHREADS], 0); + chan_enable(&cpu->chan[CHAN_OVNI_NRTHREADS], 1); + chan_set(&cpu->chan[CHAN_OVNI_NRTHREADS], 0); } } @@ -166,8 +166,8 @@ update_cpu(struct ovni_cpu *cpu) /* From the CPU channels we only need to manually update the number of * threads running in the CPU */ - if(chan_get_st(&cpu->chan[CHAN_OVNI_NTHREADS]) != (int) cpu->nrunning_threads) - chan_set(&cpu->chan[CHAN_OVNI_NTHREADS], (int) cpu->nrunning_threads); + if(chan_get_st(&cpu->chan[CHAN_OVNI_NRTHREADS]) != (int) cpu->nrunning_threads) + chan_set(&cpu->chan[CHAN_OVNI_NRTHREADS], (int) cpu->nrunning_threads); /* Update all tracking channels */ for(i=0; i