top(1): always recount number of online CPUs
authorcheloha <cheloha@openbsd.org>
Fri, 16 Dec 2022 15:54:27 +0000 (15:54 +0000)
committercheloha <cheloha@openbsd.org>
Fri, 16 Dec 2022 15:54:27 +0000 (15:54 +0000)
commit2ea969edd50dc3359f21b08de4b38168e4dcb26d
treea5d0830c8c834f8a53e63fc3943db1da42daee1f
parentaf25dd1799e11923cc3ccdba8faba2436fe60f26
top(1): always recount number of online CPUs

If hw.smt is toggled while top(1) is running in "combined" mode the
CPU count on the CPU state line is incorrect.

We always need to recount the number of online CPUs.
usr.bin/top/top.c