|
Next
Previous
Contents
2. Syntax used2.1 Function SyntaxWhen speaking about a function, we write:
"function_name [ file location . extension ]" For example:
"schedule [kernel/sched.c]" tells us that we talk about
"schedule"
function retrievable from file
[ kernel/sched.c ]
Note: We also assume /usr/src/linux as the starting directory.
2.2 IndentationIndentation in source code is 3 blank characters.
2.3 InterCallings AnalysisOverviewWe use the"InterCallings Analysis "(ICA) to see (in an indented fashion) how kernel functions call each other.
For example, the sleep_on command is described in ICA below:
|sleep_on
|init_waitqueue_entry --
|__add_wait_queue | enqueuing request
|list_add |
|__list_add --
|schedule --- waiting for request to be executed
|__remove_wait_queue --
|list_del | dequeuing request
|__list_del --
sleep_on ICA
The indented ICA is followed by functions' locations:
Note: We don't specify anymore file location, if specified just before.
DetailsIn an ICA a line like looks like the following
function1 -> function2 means that < function1 > is a generic pointer to another function. In this case < function1 > points to < function2 >.
When we write:
function: it means that < function > is not a real function. It is a label (typically assembler label).
In many sections we may report a ''C'' code or a ''pseudo-code''. In real source files, you could use ''assembler'' or ''not structured'' code. This difference is for learning purposes.
PROs of using ICAThe advantages of using ICA (InterCallings Analysis) are many:
CONTROs of using ICA
As all theoretical models, we simplify reality avoiding many details, such as real source code and special conditions.
Next Previous Contents Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |