From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 24 Jan 2011 12:24:24 -0500 To: 9fans@9fans.net Message-ID: In-Reply-To: References: <8a9a463a44262b0750c031aa23208398@brasstown.quanstro.net> <9cf6ac2467fb616ae6179a1571097524@swcp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] plan9 go output faults on 9vx with rfork Topicbox-Message-UUID: a11b6b58-ead6-11e9-9d60-3106f5b1d025 On Mon Jan 24 12:19:47 EST 2011, yiyu.jgl@gmail.com wrote: > 2011/1/23 ron minnich : > > change all sem* bits in a/sysproc.c to use uint32 not long > > change ed script so it won't do the wrong thing in future. > > Just for the records, the ed scripts are not working with current > kernel sources, they need to be updated. I gave it a try, but > sometimes I started from the ed script and sometimes from the .c file. > I was just trying to make it work, but would be surprised if it worked > well (as a matter of fact, last time I tried to update the code using > the ed scripts I broke 9vx and it was a hassle for everyone, just see > this thread: http://9fans.net/archive/2010/09/190). In particular, the > use of uint32 or long is not uniform. The situation is even worse for > the ip code, there are no scripts at all. This is in my TODO list, but > I'm not working on it now and I don't know when (or if) I will. the type use should be uniform. the only type that should change size depending on the kernel is uintptr. everything else is assumed fixed. unfortunately, ulong is still used where uintptr should be. it's fairly rampant. we should have short = 2 bytes int long = 4 bytes vlong = 8 bytes uintptr = sizeof(void*) note that long is almost completely useless in our type system, except that we get to add a spurious ell to formats. (i'm also not convinced of the utility of uint, but that's just me.) - erik