Line 2238 Unix V6 Comment: You are not expected to understand this.


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Line 2238 Unix V6 Comment: You are not expected to understand this.
# 1  
Old 04-29-2009
Line 2238 Unix V6 Comment: You are not expected to understand this.

Here is the famous line 2238 of Unix V6 which is part of some of the most delicate parts of the kernel, context switching.

This comment received huge publicity and just may be the the most famous source code comment in computing history.

Code:
2230	/*
2231	 * If the new process paused because it was
2232	 * swapped out, set the stack level to the last call
3333	 * to savu(u_ssav).  This means that the return
2235	 * actually returns from the last routine which did
2236	 * the savu.
2237	 *
2238	 * You are not expected to understand this.
2239	 */
2240	if(rp->p_flag&SSWAP) {
2241		rp->p_flag =& ~SSWAP;
2242		aretu(u.u_ssav);
2243	}

Ref: Unix Sixth Edition Kernel Source Code, © Western Electric Company
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Echo printing a line in 2 lines; expected to print in one line

Dear All, fileName: therm.txt nc3h7o2h 7/27/98 thermc 3h 8o 2 0g 300.000 5000.000 1390.000 41 1.47017550e+01 1.71731699e-02-5.91205329e-06 9.21842570e-10-5.36438880e-14 2 -2.99988556e+04-4.93387892e+01 2.34710908e+00 4.34517484e-02-2.65357553e-05 3 ... (7 Replies)
Discussion started by: linuxUser_
7 Replies

2. Shell Programming and Scripting

How to comment a specific line of a file?

Hi, I need to comment out (insert # in the front of a line) a line that has entry Defaults requiretty using command-line as I need to do this on hundreds of servers. From Defaults requiretty To #Defaults requiretty I tried something like below but no luck: Please advise,... (3 Replies)
Discussion started by: prvnrk
3 Replies

3. Shell Programming and Scripting

Removing the sas comment line using UNIX

I have tried a lot, Need your help guys. SAS Program: data one ; /* Data step */ Input name $; /*Dec variables*/ I want to remove the commented part(/* Data step */) alone. I have tried using sed command but it is deleting the entire line itself. i need unix command to separate this and... (6 Replies)
Discussion started by: saaisiva
6 Replies

4. Shell Programming and Scripting

comment a line of the patterns is a the beginning of the line

I need to comment the lines starting with pattern "exclude" or "exclude=". If the work exclude comes at any other part, ignore it. Also, ignore, excludes, excluded etc. Ie only comment the line starting with exclude. File contents. exclude exclude= hi I am excluded excludes excludes= ... (9 Replies)
Discussion started by: anil510
9 Replies

5. Shell Programming and Scripting

Comment a line with SED

I have around 25 hosts and each hosts has 4 instance of jboss and 4 different ip attached to it . I need to make some changes to the startup scripts. Any tips appreciated. I have total of 100 instances which bind to 100 different ip address based on instance name. For example File1 ... (1 Reply)
Discussion started by: gubbu
1 Replies

6. Shell Programming and Scripting

How To comment a line where a word exists

Hi All Can u help me.. My problem is comment (#) a line where a word exists in that line sample: cat /tmp/file.txt monitor 192.168.1.11 Copying files in current directory 1 monitor 192.168.1.1 Copying files in current directory 2 monitor 192.168.1.12 Copying files in current... (2 Replies)
Discussion started by: darren_j
2 Replies

7. Shell Programming and Scripting

Using sed to comment out line in /etc/vfstab

I am running a script remotely to do the following 1. Kill all processes by a user 2. Uninstall certain packages 3. FTP over a new file 4. Kill a ldap process that is not allowing my /devdsk/c0t0d0s7 slice to un-mount 5. Unmount /h 6. comment out the slice in vfstab 7. newfs the... (9 Replies)
Discussion started by: deaconf19
9 Replies

8. UNIX for Dummies Questions & Answers

how to replace a text of line with a comment line

I want to replace this line : "test compare visible] true" and make it "#test compare visible] true". How can I do it ? And it should be checked in many sub folder files also. (6 Replies)
Discussion started by: manoj.b
6 Replies

9. Shell Programming and Scripting

Placing a comment at the beginning of a line

Hello - I am running Linux. I want to place a comment char at the beginning of a line in a file. For example: testvar=`grep username /etc/people sed -e 's/$testvar/#$testvar/g' /etc/people I cannot get the above commands to put a comment at the beginning of the line. Any... (3 Replies)
Discussion started by: mlike
3 Replies

10. Programming

remove single-line comment

Does anyone knows how to write a program to remove single-line comment in C program? that means it don't read anything behind // (3 Replies)
Discussion started by: Icy002
3 Replies
Login or Register to Ask a Question
erl_recomment(3erl)					     Erlang Module Definition					       erl_recomment(3erl)

NAME
erl_recomment - Inserting comments into abstract Erlang syntax trees. DESCRIPTION
Inserting comments into abstract Erlang syntax trees This module contains functions for inserting comments, described by position, indentation and text, as attachments on an abstract syntax tree, at the correct places. EXPORTS
quick_recomment_forms(Tree::Forms, Comments::[Comment]) -> syntaxTree() Types Forms = syntaxTree() | [syntaxTree()] Comment = {Line, Column, Indentation, Text} Line = integer() Column = integer() Indentation = integer() Text = [string()] Like recomment_forms/2 , but only inserts top-level comments. Comments within function definitions or declarations ("forms") are simply ignored. recomment_forms(Tree::Forms, Comments::[Comment]) -> syntaxTree() Types syntaxTree() (see module erl_syntax) Forms = syntaxTree() | [syntaxTree()] Comment = {Line, Column, Indentation, Text} Line = integer() Column = integer() Indentation = integer() Text = [string()] Attaches comments to the syntax tree/trees representing a program. The given Forms should be a single syntax tree of type form_list , or a list of syntax trees representing "program forms". The syntax trees must contain valid position information (for details, see recomment_tree/2 ). The result is a corresponding syntax tree of type form_list in which all comments in the list Comments have been attached at the proper places. Assuming Forms represents a program (or any sequence of "program forms"), any comments whose first lines are not directly associated with a specific program form will become standalone comments inserted between the neighbouring program forms. Furthermore, comments whose column position is less than or equal to one will not be attached to a program form that begins at a conflicting line number (this can happen with preprocessor-generated line -attributes). If Forms is a syntax tree of some other type than form_list , the comments will be inserted directly using recomment_tree/2 , and any comments left over from that process are added as postcomments on the result. Entries in Comments represent multi-line comments. For each entry, Line is the line number and Column the left column of the comment (the column of the first comment-introducing " % " character). Indentation is the number of character positions between the last non-whitespace character before the comment (or the left margin) and the left column of the comment. Text is a list of strings rep- resenting the consecutive comment lines in top-down order, where each string contains all characters following (but not including) the comment-introducing " % " and up to (but not including) the terminating newline. (Cf. module erl_comment_scan .) Evaluation exits with reason {bad_position, Pos} if the associated position information Pos of some subtree in the input does not have a recognizable format, or with reason {bad_tree, L, C} if insertion of a comment at line L , column C , fails because the tree structure is ill-formed. See also: erl_comment_scan , quick_recomment_forms/2 , recomment_tree/2 . recomment_tree(Tree::syntaxTree(), Comments::[Comment]) -> {syntaxTree(), [Comment]} Types Comment = {Line, Column, Indentation, Text} Line = integer() Column = integer() Indentation = integer() Text = [string()] Attaches comments to a syntax tree. The result is a pair {NewTree, Remainder} where NewTree is the given Tree where comments from the list Comments have been attached at the proper places. Remainder is the list of entries in Comments which have not been inserted, because their line numbers are greater than those of any node in the tree. The entries in Comments are inserted in order; if two comments become attached to the same node, they will appear in the same order in the program text. The nodes of the syntax tree must contain valid position information. This can be single integers, assumed to represent a line num- ber, or 2- or 3-tuples where the first or second element is an integer, in which case the leftmost integer element is assumed to represent the line number. Line numbers less than one are ignored (usually, the default line number for newly created nodes is zero). For details on the Line , Column and Indentation fields, and the behaviour in case of errors, see recomment_forms/2 . See also: recomment_forms/2 . AUTHORS
Richard Carlsson <richardc@it.uu.se > syntax_tools 1.6.7 erl_recomment(3erl)