[M3commit] CVS Update: cm3

Jay K jay.krell at cornell.edu
Mon Dec 27 22:36:19 CET 2010


The NIL checks make it easier to use, if you can depend on newer version.
Disable/EnableSwitching are sometimes missing on calls to free -- it is very error prone.
They are used on malloc. I believe they are needed on free.
I went back though and only disable/enable selectively. Still very error prone.

 - Jay

> From: hosking at cs.purdue.edu
> Date: Mon, 27 Dec 2010 12:29:20 -0500
> To: jkrell at elego.de
> CC: m3commit at elegosoft.com
> Subject: Re: [M3commit] CVS Update: cm3
> 
> Umm, why?
> This is all unnecessary.
> 
> Antony Hosking | Associate Professor | Computer Science | Purdue University
> 305 N. University Street | West Lafayette | IN 47907 | USA
> Office +1 765 494 6001 | Mobile +1 765 427 5484
> 
> 
> 
> 
> On Dec 27, 2010, at 11:43 AM, Jay Krell wrote:
> 
> > CVSROOT:	/usr/cvs
> > Changes by:	jkrell at birch.	10/12/27 11:43:29
> > 
> > Modified files:
> > 	cm3/m3-libs/m3core/src/: m3core.h 
> > 	cm3/m3-libs/m3core/src/C/Common/: CstdlibC.c M3toC.m3 
> > 	cm3/m3-libs/m3core/src/unix/Common/: Uin.c Upwd.c 
> > 
> > Log message:
> > 	Scheduler__DisableSwitching / Scheduler__EnableSwitching around wrappers
> > 	
> > 	I noticed calls to free() were missing some, and this
> > 	whole area is both error-prone and almost completely untested:
> > 	- it only matters when using user threads
> > 	- and if thread switches occurs at just the right time
> > 	
> > 	This still leaves hazard in lots of custom wrappers.
> > 	I suggest frontend handle this.
> > 	
> > 	allow NIL pointers in M3toC.Free*, silently do nothing with them
> > 	(again here, we have VAR where CONST is really desired!)
> > 	
> > 	Upwd.c: use struct passwd and remove typedef struct passwd passwd_t
> > 	I had generally done this, back end I discovered newer Solaris headers clash with such typedefs, alas
> > 	
> > 	Uin.c: add M3_DLL_EXPORT
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3commit/attachments/20101227/506873c5/attachment-0002.html>


More information about the M3commit mailing list