Date: Sat, 30 Jan 1999 10:57:42 +1030 From: Greg Lehey <grog@lemis.com> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: Brian Feldman <green@unixhelp.org>, chat@FreeBSD.ORG Subject: You are not expected to understand this (was: btokup().. patch to STYLE(9) (fwd)) Message-ID: <19990130105741.X8473@freebie.lemis.com> In-Reply-To: <199901291708.MAA22267@khavrinen.lcs.mit.edu>; from Garrett Wollman on Fri, Jan 29, 1999 at 12:08:02PM -0500 References: <19990129004749.A8899@netmonger.net> <Pine.BSF.4.05.9901291128380.21302-100000@janus.syracuse.net> <199901291708.MAA22267@khavrinen.lcs.mit.edu>
index | next in thread | previous in thread | raw e-mail
On Friday, 29 January 1999 at 12:08:02 -0500, Garrett Wollman wrote:
> <<On Fri, 29 Jan 1999 11:29:29 -0500 (EST), Brian Feldman <green@unixhelp.org> said:
>
>> I seem to remember there once was a comment in a well-known body of code, which
>> went something like:
>> "You are not supposed to understand this."
>
> The comment was actually ``You are not expected to understand this'',
> and it was in v7's swtch().
Almost. From the Sixth Edition, /usr/sys/ken/slp.c, the end of
swtch():
rp = p;
curpri = n;
/*
* Switch to stack of the new process and set up
* his segmentation registers.
*/
retu(rp->p_addr);
sureg();
/*
* If the new process paused because it was
* swapped out, set the stack level to the last call
* to savu(u_ssav). This means that the return
* which is executed immediately after the call to aretu
* actually returns from the last routine which did
* the savu.
*
* You are not expected to understand this.
*/
if(rp->p_flag&SSWAP) {
rp->p_flag =& ~SSWAP;
aretu(u.u_ssav);
}
/*
* The value returned here has many subtle implications.
* See the newproc comments.
*/
return(1);
}
This code had changed completely by the Seventh Edition (and the
directory name had changed to /usr/sys/sys).
Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990130105741.X8473>
