The source listing is preceded by a cross-reference that lists every defined
constant, struct, global variable, and function in xv6. Each entry gives,
on the same line as the name, the line number (or, in a few cases, numbers)
where the name is defined. S
The numbers to the left of the file names in the table are sheet numbers.
The source code has been printed in a double column format with fifty
lines per column, giving one hundred lines per sheet (or page).
Thus there is a convenient relationship between
/ Mutual exclusion lock.
struct spinlock cfw_
/ Is the lock held?
/ For debugging:
uint pcs; /
Name of lock.
The number of the cpu holding the lock.
The call stack (an array of program counters)
that locked th
/ in-core file system types
struct inode cfw_
Is the inode "locked"?
/ copy of disk inode
/ system calls
int exit(void) _attribute_(noreturn);
int write(int, void*, int);
int read(int, void*, int);
int exec(char*, char*);
int open(char*, int);
int mknod(char*, short
Generate vectors.S, the trap/interrupt entry points.
There has to be one entry point per interrupt number
since otherwise there's no way for trap() to discover
the interrupt number.
print "# generated by vectors.pl - do not edit
8 11:37 2006
xv6 is a reimplementation of Dennis Ritchies and Ken Thompsons Unix
Version 6 (v6). xv6 loosely follows the structure and style of v6,
but is implemented for a modern x86based multiprocessor using ANSI C.
8 11:37 2006
# You may now use double quotes around pathnames, in case
# your pathname includes spaces.
# The configuration interface is a series of menus or dialog boxes that
# allows you to change all the settings that control Bochs's behavio
int setjmp(struct jmpbuf *jmp);
void longjmp(struct jmpbuf *jmp);
Setjmp saves its stack environment in jmp for later use by longjmp.
It returns 0.
Longjmp restores the environment saved by the last call of setjmp.
It then caus
/ Memory allocator by Kernighan and Ritchie, The C programming Language,
/ 2nd ed. Section 8.7.
typedef long Align;
union header cfw_
union header *ptr;