contextswitch icon indicating copy to clipboard operation
contextswitch copied to clipboard

Incorrect switch count in timectxsw.c

Open cs5115 opened this issue 7 years ago • 0 comments

Hi tsuna,

In your timectxsw.c benchmark, the variable nswitches is not correct.

It should be: const int nswitches = iterations * 6;

and not: const int nswitches = iterations << 2;

If you follow through the child and parent for loops you will see there are 6 context switches per iteration.

Many thanks for a really useful bit of code.

Christo

cs5115 avatar Feb 08 '18 11:02 cs5115