John,
The process control extensions do not impose any additional constraint on the validity of process handles over and above what the LRM already specifies. Currently the LRM says
"When the underlying process instance terminates, an implementation may choose to invalidate any
associated process handles but is not obliged to do so. In other words, when a process terminates, an
implementation is neither obliged to keep the handle valid nor to invalidate the handle."
In your example, after B terminates, if a process control extension is invoked on A with the include_descendants clause, one of two things can happen
1) if an implementation invalidated process handles associated with B as soon as B terminated, the process control extension will not be able to find B or C as decendants of A, and will not apply to B and C.
2) if an implementation kept the process handles associated with B valid after B terminated (say beacuse it had live children), the process control extension will be able to find B and C as descendants of A and will also apply to B and C.
An implementation need not to do anything special to choose 1) or 2). It should automatically fall out - note that sc_process_handle::get_child_objects() returns an empty vector if the handle is invalid.
Does this clarify the intent?
Thanks,
-Bishnupriya
________________________________
From: john.aynsley@doulos.com [mailto:john.aynsley@doulos.com]
Sent: Friday, May 14, 2010 4:42 PM
To: Bishnupriya Bhattacharya
Cc: systemc-p1666-technical@eda.org
Subject: RE: Process Control Extensions
Bishnupriya,
* Is include_descendants intended to find descendents of intermediate processes that have already terminated, i.e. children of dead children?
[bpriya> yes, it is. Note that the process on which the construct is being called can itself be terminated, then the construct applies to its descendants - the same logic holds for an intermediate process in the sub-hierarchy that has terminated.]
Can you please clarify? Suppose process A spawns process B and B spawns C, and suppose process B is terminated first before A or C. You say that include_descendents on A should find C. Is this meant to imply that the implementation is obliged to keep the process handle for the terminated process B valid until after all its children have terminated, or is an implementation permitted to invalidate any handles to B while B still has surviving children? Would this be implementation-dependent?
Thanks,
John A
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon May 17 00:02:15 2010
This archive was generated by hypermail 2.1.8 : Mon May 17 2010 - 00:02:19 PDT