[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 23:04:51 EST 2008
D. Herrendoerfer wrote:
> 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.
Yes, of course.
> 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.
Thank you.
I'll prepare a new patch according to the above.
Regards,
--
(ASAYAMA Kazunori
(asayama at sm.sony.co.jp))
t
More information about the cbe-oss-dev
mailing list