Another variant of the same issue is what happens if an initializer does a fork/join_none? Particularly in the cases that were raised by Arturo and Dave (class construction), there is no parent thread in a declaration. some_class decl = new; // where "new" has a fork/join_none When are these threads supposed to start? If they use fine-grained process control (semaphores or similar), are those supposed to be guaranteed to complete before all initial and always blocks (assuming they terminate without other delays)? I think the semantics of this needs some work if it is to be considered legal. Gord. Bresticker, Shalom wrote: > I see you're correct. I still have a lot to learn about SV. > > So let me now ask the following. Suppose I have the following code: > > initial > begin > ... > fork > ... > ... > join_none > end > > And there is additional code so that the simulation does not end when > this initial block finishes. > > The LRM says about join_none, > "The parent process continues to execute concurrently with all the > processes spawned by the fork. The spawned processes do not start > executing until the parent thread executes a blocking > statement." > > The parent thread is this initial block. Where does it execute a > blocking statement? When do the threads in the fork...join_none execute? > > Thanks, > Shalom > > >>-----Original Message----- >>From: Steven Sharp [mailto:sharp@cadence.com] >>Sent: Monday, February 20, 2006 10:19 PM >>To: sharp@cadence.com; sv-ec@eda.org; sv-bc@eda.org; >>Dave_Rich@mentor.com; Bresticker, Shalom >>Subject: RE: [sv-ec] RE: [sv-bc] Can a function contain a >>fork/join/any/none? >> >> >> >>>From: "Bresticker, Shalom" <shalom.bresticker@intel.com> >> >>>Who is the parent thread in this case? Could I argue that the >> >>parent >> >>>disappears and thus never reaches a blocking statement? >> >>No. I don't believe that calling a function is considered by >>the 1800 >>LRM to create a thread. The thread executing in the function >>is the >>same thread that called the function and the same thread that >>continues >>after the return. > > > > -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.comReceived on Tue Feb 21 07:04:43 2006
This archive was generated by hypermail 2.1.8 : Tue Feb 21 2006 - 07:05:17 PST