<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
I agree making ThreadF unsafe isn't worthwhile -- it has a safe subset e.g. MyId and changing it breaks too much -- there was another break besides "debug", I think commandrw, at which point I rethought.<br>But I think moving the new/potentially unsafe part to ThreadUnsafe is better, so the users of MyHeapState, while still unsafe, don't have to presume and perhaps get incorrect the type. Again, I think there are degrees of unsafety and I'd rather see an UNTRACED REF to a specific type than an address, as I had left it.<br><br> - Jay<br><br><br><hr id="stopSpelling">CC: hosking@elego.de; m3commit@elegosoft.com<br>From: hosking@cs.purdue.edu<br>To: jay.krell@cornell.edu<br>Subject: Re: [M3commit] CVS Update: cm3<br>Date: Tue, 8 Sep 2009 12:09:55 -0400<br><br><div><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div><span class="EC_Apple-style-span" style="font-size: medium;"><font class="EC_Apple-style-span" color="#0000ff" face="'Gill Sans'">ThreadF is still safe for the world. Any module that imports ThreadF for the purposes of using MyHeapState is going to need to be unsafe anyway, so forcing it to cast (unsafe anyway) is no big deal. MyHeapState is used only by the allocator. To be perfectly honest, I would have no problem making ThreadF UNSAFE since it has so much dangerous stuff in it. But leaving it safe keeps it they way it has always been.</font></span></div></span></span></span></span></span></span></span></span></div></span></div></span> </div><br><div><div>On 8 Sep 2009, at 12:02, Jay K wrote:</div><br class="EC_Apple-interchange-newline"><blockquote><span class="EC_Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="EC_hmmessage" style="font-size: 10pt; font-family: Verdana;">Really? Isn't it considerably safer to have a function declaration list the actual type instead of requiring all the callers to cast?<br>I left ThreadF safe and I think I left it all much better than this.<br>Safety is not a boolean. I'd much rather have a lot of UNTRACED REFs to specific types than a bunch of ADDRESSes.<br><br> - Jay<br><br><br>> Date: Tue, 8 Sep 2009 17:16:19 +0000<br>> To:<span class="EC_Apple-converted-space"> </span><a href="mailto:m3commit@elegosoft.com">m3commit@elegosoft.com</a><br>> From:<span class="EC_Apple-converted-space"> </span><a href="mailto:hosking@elego.de">hosking@elego.de</a><br>> Subject: [M3commit] CVS Update: cm3<br>><span class="EC_Apple-converted-space"> </span><br>> CVSROOT: /usr/cvs<br>> Changes by: hosking@birch. 09/09/08 17:16:19<br>><span class="EC_Apple-converted-space"> </span><br>> Modified files:<br>> cm3/m3-libs/m3core/src/runtime/common/: RTAllocator.m3<span class="EC_Apple-converted-space"> </span><br>> cm3/m3-libs/m3core/src/thread/Common/: m3makefile<span class="EC_Apple-converted-space"> </span><br>> cm3/m3-libs/m3core/src/thread/POSIX/: ThreadF.i3 ThreadPosix.m3<span class="EC_Apple-converted-space"> </span><br>> cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadF.i3<span class="EC_Apple-converted-space"> </span><br>> ThreadPThread.m3<span class="EC_Apple-converted-space"> </span><br>> cm3/m3-libs/m3core/src/thread/WIN32/: ThreadF.i3<span class="EC_Apple-converted-space"> </span><br>> ThreadInternal.i3<span class="EC_Apple-converted-space"> </span><br>> ThreadWin32.m3<span class="EC_Apple-converted-space"> </span><br>><span class="EC_Apple-converted-space"> </span><br>> Log message:<br>> Forgot to propagate safety fix for MyHeapState to WIN32 and POSIX. Fixed now, which allows me<br>> to undo Jay's unfortunate bandaid. ThreadF is safe as god intended.<br>><span class="EC_Apple-converted-space"> </span><br></div></span></blockquote></div><br></body>
</html>