Hi,
this is a minor issue, but it does affect SCE-MI implementation. The
SceMi::BindMessageInPort() and SceMi::BindMessageOutPort() methods each
take a binding argument that is a pointer to a struct the user has
defined. Is the implementation required to copy the contents of this
struct (if the pointer is not NULL) internally? The answer to this
question affects what the application can do with the struct after
calling one of these methods. If the answer is yes, the application can
do whatever it wants with the struct. If the answer is no, then the
application must keep the struct around until Shutdown() time. Furthermore,
is must potentially keep track of multiple of these structs (in the worst
case one per port if none of them can be shared). Also, if the answer
is no, this raises several other questions such as will the application
be allowed to change the fields of the binding structs while the emulation
is running.
My take on these is that the implementation should be required to copy
the contents of the binding argument. This places the least constraints
on the application and avoids some potentially nasty problems if the
application accidentally changed one or more fields of the struct while
the emulation is running. If it actually wants to change these fields
it can use the ReplaceBinding() method.
If the committee agrees, I propose we add a sentence to the description
of each of the BindMessage(In|Out)Port() methods that states that the
implementation is required to copy the contents of the binding struct
and the application is free to discard of the struct after the call.
Per
Received on Wed Mar 17 08:11:07 2004
This archive was generated by hypermail 2.1.8 : Wed Mar 17 2004 - 08:11:11 PST