Subject: [sv-ec] ERR-4
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Sun Aug 17 2003 - 23:36:13 PDT
MessageLifetime of automatic variables in fork/join_none
I propose that the following be added to Section 9.6
--------------------------------------------------------------------------------
Automatic variables in the scope enclosing a fork-join_none or fork-join_any shall be copied on fork of each process that references those variables. Only the variables actually used by a sub-process need to be copied, not all automatic variables. For example:
task automatic loop_fork();
for( int j = 1; j <= 3; ++j )
fork
$display( "%0d", j );
join_none
endtask
The example above displays 123 (not 333).
--------------------------------------------------------------------------------
Arturo
This archive was generated by hypermail 2b28 : Sun Aug 17 2003 - 23:36:46 PDT