RL02 version of UNIX6?
Paul Koning
paulkoning at comcast.net
Thu Feb 2 12:50:19 CST 2017
> On Feb 2, 2017, at 1:41 PM, Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:
>
>> From: Phil Blundell
>
>> I suspect it would probably not be all that hard to write some
>> sort of preprocessor to convert such code
>
> Really? Check out:
>
> http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/sys/ken/pipe.c
>
> (Needless to say, none of the 'int *' things are actually pointers to
> integers!)
>
> In particular, what will lines like this:
>
> sleep(ip+2, PPIPE);
>
> do, depending on what 'ip' is declared as?
If "ip" is an int *, it would pass the address in ip plus 2 * 2. If ip is actually the address of some struct, then hopefully that address offset by 4 is a meaningful address. I'm guessing that the 2 in there represents sizeof(foo)/sizeof(int). Right?
paul
More information about the cctech
mailing list