From mboxrd@z Thu Jan 1 00:00:00 1970 From: jnc@mercury.lcs.mit.edu (Noel Chiappa) Date: Sun, 5 Nov 2017 10:43:06 -0500 (EST) Subject: [TUHS] origins of void* Message-ID: <20171105154306.D325018C09D@mercury.lcs.mit.edu> > From: Clem Cole > typing hard started to become more important in the kernel. I can imagine! The V6 kernel had all sorts of, ah, 'unusual' typing - as I learned to my cost when I did that hack version of 'splice()' (to allow a process in a pipline to drop out, and join the two pipes together directly), which I did in V6 (my familiar kernel haunt). Since a lot of code does pointer math to generate wait 'channel' numbers, e.g.: sleep(ip+2, PPIPE); when I naively (out of habit) tried to declare my pointers to be the correct type, the math didn't work any more! ('ip', in this particular case, was declared to be an 'int *'.) No doubt part of this was inherited from older versions (of the system, and C); the code was working, and there was no call to tweak it. The lack of casts/coercion in the V6 C compiler may have been an issue, too - I had to do some equally odd things to make my splice() code work! Noel