Dear Stefan Schaal,

In message <[email protected]> you wrote:
> Sorry, I attached the wrong C-program in the previous posting ....  
> here is the corrected version:

I'm not sure what exactly you are trying to test, but I think you
should invest a little more time in your test cases.

>   attached is a little C program that spawns off a task which runs a  
> heavy tiny math job. Despite my 8 processor machine, taking this one  

Does it? Not for me.

> void
> run_task(void *dummy)
> {
>    int i;
>    double foo = 1.0;
> 
>    for (i=1; i<=100000000; ++i)
>      foo = foo*1.1;
> 
>    return;
> }

On x86, this code compiles for me into this:

        .text
        .p2align 4,,15
.globl run_task
        .type   run_task, @function
run_task:
        pushl   %ebp
        movl    %esp, %ebp
        popl    %ebp
        ret
        .size   run_task, .-run_task
        .ident  "GCC: (GNU) 4.4.1 20090725 (Red Hat 4.4.1-2)"
        .section        .note.GNU-stack,"",@progbits

Similar on ARM and Power.

As you can see, the compiler completely optimizes away your "tiny math
job". So what should be loading your CPU?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
"Nature is very un-American.  Nature never hurries."
- William George Jordan

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to