The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: jnc@mercury.lcs.mit.edu (Noel Chiappa)
Subject: [TUHS] origins of void*
Date: Sun,  5 Nov 2017 10:43:06 -0500 (EST)	[thread overview]
Message-ID: <20171105154306.D325018C09D@mercury.lcs.mit.edu> (raw)

    > 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


             reply	other threads:[~2017-11-05 15:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-05 15:43 Noel Chiappa [this message]
2017-11-05 16:58 ` Steve Johnson
  -- strict thread matches above, loose matches on Subject: below --
2017-11-06  0:37 Doug McIlroy
2017-11-06  4:59 ` Steve Johnson
2017-11-04 10:19 Paul Ruizendaal
2017-11-05  9:48 ` Clem Cole
2017-11-05 10:06 ` arnold
2017-11-05 13:20   ` Ron Natalie
2017-11-05 15:14     ` Warner Losh
2017-11-05 17:53       ` Clem cole
2017-11-05 18:29         ` Steve Simon
2017-11-05 20:12           ` Clem cole
2017-11-05 21:08             ` Chet Ramey
2017-11-05 21:38               ` Clem cole
2017-11-05 21:53             ` Steve Simon
2017-11-05 20:44   ` Paul Ruizendaal
2017-11-05 21:06     ` Warner Losh
2017-11-06  7:24     ` arnold
2017-11-06 15:02       ` Warner Losh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171105154306.D325018C09D@mercury.lcs.mit.edu \
    --to=jnc@mercury.lcs.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).