[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Sat Jul 31 13:12:54 CEST 2010


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	10/07/31 13:12:54

Modified files:
	cm3/m3-libs/sysutils/src/: FSUtils.m3 

Log message:
	replace RmRec with in implementation that only keeps one DIR*/Iterator
	open at a time.
	This is an experiment.
	The code is somewhat less efficient, producing more garbage, but
	also kind of small and nice to read.
	
	If this works, which I'm giving 50% odds, it still doesn't make sense.
	
	The opendir/readdir code I've seen is in fact reentrant.
	You can recurse while holding open the parent.
	They don't use a global or thread local, the use a buffer
	that is in the DIR*.
	
	Old version left for now under OldRmRec.
	With the debug printing removed.
	
	Both versions I believe are fairly racy, in that competing
	RmRecs will cause the other to fail. "Preflight" for existance
	doesn't cut and is in fact a significant deoptimization,
	This version is more efficient in that regard: don't call
	stat on children already determined to be file or directory.
	Still a wasted call at toplevel for existance.




More information about the M3commit mailing list