Home

Old Site

Natural History

Radio Valves

Amateur Radio

Computer stuff

Me

Electronics and Computer things

AT&T Bell Labs Unix ™ tapes
AT&T Bell Research Labs Unix™
6th. & 7th. Edition tapes.
Contamination Meter
Meter, Contamination, No. 1
Set 5CG0012

A Comment

This is one of the best code comments I have ever read. A wonderful hook that caught me. I spent a lot of time and learnt a lot of C.

Dennis Ritchie explains the comment here. I think he's being too modest about its value.

/* 
 * 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);

slp.c Bell Labs Unix Edition 6 source code. Line 2230ff in the Lions numbering. See the Lions commentary for some assistance.

© Andy Cowley, 2005-2012     Contact     Home

Valid XHTML 1.1! Valid CSS! I heart Validator Wikipedia Affiliate Button

This page last modified - Tuesday, 18-May-2010 12:07:16 BST, rendered - Saturday, 28-Jan-2012 05:47:58 GMT

for (none) 38.107.179.227 by www.andycowley.eu