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

Kazunori Asayama asayama at sm.sony.co.jp
Fri Jun 6 01:39:17 EST 2008


D. Herrendoerfer wrote:
> I think the change in essence is ok, but it modifies the
> spe_stop_info_read() significantly and will make existing code fail.
>  
> For example:
>   Applications that already call spe_stop_info_read() to keep the
>   pipe from stalling must now stop doing so.
>   The Documentation states that this must be done.

Indeed... this change may confuse such applications if the applications
check the return code of spe_stop_info_read.

>   
> So I believe this is an API modification. 
> If we decide to do this we need to increase the version number and
> make sure this is documented apropriately.
> 

I'd like to keep the compatibility as much as possible.

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.

  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).

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



More information about the cbe-oss-dev mailing list