[M3commit] CVS Update: cm3
jkrell at birch.elego.de
Mon Jan 15 05:33:41 CET 2007
Changes by: jkrell at birch. 07/01/15 05:33:41
Use at least what in C++ would be "static initialization", more efficient than "dynamic initialization",
not sure Modula-3 does it that way, didn't step through it. In C++ that'd remove the code that does the assignment.
Reverse sense of needsInitialization to initialized so that the initialized value of the "guard" is FALSE.
Zero initialization is generally more efficient than non-zero initialization. Again it depends on the tools,
but in C++ this makes it so no room is needed in the .exe/.dll for the variable, for its initial value.
Put in the double checked locking discussed on m3devel for the initialization here.
Including doing our own cleanup if we lose the race.
Note that this appears very unlikely since initialization is from the module's main.
More information about the M3commit