[M3commit] CVS Update: cm3

Jay Krell jkrell at birch.elego.de
Mon Jan 15 05:33:41 CET 2007


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	07/01/15 05:33:41

Modified files:
	cm3/m3-libs/m3core/src/thread/WIN32/: ThreadWin32.m3 

Log message:
	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 mailing list