[Cbe-oss-dev] [RFC/PATCH 1/2] libspe2: Disable spe_stop_info_read if no handler is registered

D. Herrendoerfer d.herrendoerfer at herrendoerfer.name
Fri Jun 6 22:13:31 EST 2008


On Fri, 2008-06-06 at 00:39 +0900, Kazunori Asayama wrote:

> What do you think about the following behavior?
> 
>   a. If no stop event handler is registered, spe_context_run stores the
>      stop info on an internal buffer instead of the pipe, and
>      spe_stop_info_read reads the result from the buffer. Even if the
>      stored stop info isn't consumed by spe_stop_info_read, the buffer
>      is overwritten by the next spe_context_run, so the libspe2 can
>      avoid stalling.
> 

I think there should be an indicator that the the SPE is still busy, in
that case spe_stop_info_read() should return EAGAIN. Otherwise it should
return the buffered return value.
That would API-conform.

>   b. If any stop event handlers are registered, spe_context_run write
>      the stop info on the pipe (the same behavior as the current
>      implementation).
> 

Yes. 

> Thanks,

Regards

Dirk




More information about the cbe-oss-dev mailing list