diff --git a/src/emu/system.c b/src/emu/system.c index a8b345b..d7e85f7 100644 --- a/src/emu/system.c +++ b/src/emu/system.c @@ -297,8 +297,12 @@ init_global_indices(struct system *sys) thread_set_gindex(t, sys->nthreads++); sys->ncpus = 0; - for (struct cpu *c = sys->cpus; c; c = c->next) + sys->nphycpus = 0; + for (struct cpu *c = sys->cpus; c; c = c->next) { cpu_set_gindex(c, sys->ncpus++); + if (!c->is_virtual) + sys->nphycpus++; + } } static int diff --git a/src/emu/system.h b/src/emu/system.h index f040549..0eaad7b 100644 --- a/src/emu/system.h +++ b/src/emu/system.h @@ -27,6 +27,7 @@ struct system { size_t nthreads; size_t nprocs; size_t ncpus; /* Including virtual cpus */ + size_t nphycpus; struct loom *looms; struct proc *procs;