<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
The NIL checks make it easier to use, if you can depend on newer version.<br>Disable/EnableSwitching are sometimes missing on calls to free -- it is very error prone.<br>They are used on malloc. I believe they are needed on free.<br>I went back though and only disable/enable selectively. Still very error prone.<br><br> - Jay<br><br>> From: hosking@cs.purdue.edu<br>> Date: Mon, 27 Dec 2010 12:29:20 -0500<br>> To: jkrell@elego.de<br>> CC: m3commit@elegosoft.com<br>> Subject: Re: [M3commit] CVS Update: cm3<br>> <br>> Umm, why?<br>> This is all unnecessary.<br>> <br>> Antony Hosking | Associate Professor | Computer Science | Purdue University<br>> 305 N. University Street | West Lafayette | IN 47907 | USA<br>> Office +1 765 494 6001 | Mobile +1 765 427 5484<br>> <br>> <br>> <br>> <br>> On Dec 27, 2010, at 11:43 AM, Jay Krell wrote:<br>> <br>> > CVSROOT: /usr/cvs<br>> > Changes by: jkrell@birch. 10/12/27 11:43:29<br>> > <br>> > Modified files:<br>> > cm3/m3-libs/m3core/src/: m3core.h <br>> > cm3/m3-libs/m3core/src/C/Common/: CstdlibC.c M3toC.m3 <br>> > cm3/m3-libs/m3core/src/unix/Common/: Uin.c Upwd.c <br>> > <br>> > Log message:<br>> > Scheduler__DisableSwitching / Scheduler__EnableSwitching around wrappers<br>> > <br>> > I noticed calls to free() were missing some, and this<br>> > whole area is both error-prone and almost completely untested:<br>> > - it only matters when using user threads<br>> > - and if thread switches occurs at just the right time<br>> > <br>> > This still leaves hazard in lots of custom wrappers.<br>> > I suggest frontend handle this.<br>> > <br>> > allow NIL pointers in M3toC.Free*, silently do nothing with them<br>> > (again here, we have VAR where CONST is really desired!)<br>> > <br>> > Upwd.c: use struct passwd and remove typedef struct passwd passwd_t<br>> > I had generally done this, back end I discovered newer Solaris headers clash with such typedefs, alas<br>> > <br>> > Uin.c: add M3_DLL_EXPORT<br>> <br> </body>
</html>