[Cbe-oss-dev] [PATCH] libspe2: Initialise object-id on isolated program load

Kazunori Asayama asayama at sm.sony.co.jp
Wed Aug 15 13:04:40 EST 2007


Jeremy Kerr <jk at ozlabs.org> wrote:
> Asayama-san,
> 
> > (or we should save only the object ID).
> 
> .. which is a pointer to the program, so we'd need to do that anyway.
> 
> Also, the program handle needs to be valid during the isolated load, so 
> we have the same lifetime concerns there.

OK, I agreed.

> 
> I think some statement in the spec would be good, preferrably with input 
> from the gdb people. How about something along the lines of:
> 
> "The spe_program_handle_t pointer must be valid until the program has 
> been completely loaded to the SPE. In the case of isolated-mode 
> contexts, the program must be valid until spe_context_run() returns. 
> For non-isolated contexts, the program only needs to be valid while 
> spe_program_load() is executing."

Considering the scenarios Gerhard pointed out, it seems good to add
some explanation about the lifetime to the spec of spe_program_load
regardless of this your change; e.g., more simply, "the pointer must
be valid during execution of the SPE context", or something.

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



More information about the cbe-oss-dev mailing list