Skip to content

Incorrect switch count in timectxsw.c #3

@cs5115

Description

@cs5115

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions