Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2001 07:01:03 -0500
From:      Mike Meyer <mwm@mired.org>
To:        j mckitrick <jcm@FreeBSD-uk.eu.org>
Cc:        Michael Lucas <mwlucas@blackhelicopters.org>, Dag-Erling Smorgrav <des@ofug.org>, freebsd-chat@FreeBSD.ORG
Subject:   Re: most complex code in BSD?
Message-ID:  <15155.13183.377957.392221@guru.mired.org>
In-Reply-To: <20010622114548.A51977@dogma.freebsd-uk.eu.org>
References:  <20010621233210.A37804@dogma.freebsd-uk.eu.org> <xzp7ky5e4ua.fsf@flood.ping.uio.no> <20010622062238.A45123@blackhelicopters.org> <20010622114548.A51977@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
j mckitrick <jcm@FreeBSD-uk.eu.org> types:
> On Fri, Jun 22, 2001 at 06:22:38AM -0400, Michael Lucas wrote:
> | When I took the two-day FreeBSD Internals course McKusick taught, he
> | brought up the context-switching code.
> | 
> | The original UNIX authors were not much on comments.  When they put a
> | comment, it was to explain something really, really, *really* difficult.
> | 
> | Apparently there was a seven-word comment in the context switching
> | code that gave him a bit of a start: "You are not expected to
> | understand this."  Don't know if it's still there, but it's still
> | probably pretty scary.
> 
> Is this supposed to be in C or asm?  I thought context switches were among
> the only asm/machine dependent code.

For the v6 kernel, this is in C code. I never went looking for it in
later code, so I don't know when it vanished.

The comment in question is a couple of paragraphs, followed by that
seven-word note. If I remember correctly - my copy of Lyons being in
storage - the code was the context-switching code, and what was being
explained was the mechanism that was used to start the first process,
which involved very machine-dependent work so that that code would do
the job.

Since it's been a decade or two since I looked at that code, I may not
remember correctly.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15155.13183.377957.392221>