[Cbe-oss-dev] [RFC/PATCH] libspe: cleanup SPE running code.

Kazunori Asayama asayama at sm.sony.co.jp
Thu May 10 15:04:08 EST 2007


Jeremy Kerr <jk at ozlabs.org> wrote:
> This change cleans up the libspe code associated with spu_run:
> 
>  * Replace the "while (run_again)" loop with a goto and label. The
>    run-again case is only used in two situations, so make it a minor
>    part of the run path.
> 
>  * Change the code to use the general libspe coding style, and cleanup
>    all the inconsistent whitespace.
> 
>  * Use variables in the smallest scope possible.
> 
>  * Use more descriptive variable names, rather than 'rc', 'retval' and
>    'ret'.
> 
>  * More descriptive commenting, without repeating what the code says.
> 
>  * Add error-reporting to issue_isolated_exit().
> 
>  * set_regs should take a void *, rather than a char *.
> 
>  * Remove the big chunk of the libspe1 code that's "#if 0"-ed out.
> 
>  * Remove run.h. Noone else uses it, then we can make set_regs static.
> 
>  * Remove unnecessary variable assignements.
> 
> There should be no functional change from this patch - if there is,
> it's an error on my behalf. My tests still all run fine, but some
> manual review would be great. Masana - could you excercise the
> isolated mode behaviour?

This and another cleanup patch seem OK for me, and they also passed my
tests (though isolated mode was not tested).

--
(ASAYAMA Kazunori
  (asayama at sm.sony.co.jp))
t



More information about the cbe-oss-dev mailing list