Skip to content

Commit 4638cab

Browse files
author
Robert Morris
committed
fix runoff complaints about pagination and long lines
1 parent 164f4ba commit 4638cab

File tree

11 files changed

+25
-33
lines changed

11 files changed

+25
-33
lines changed

README

+10-16
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,16 @@ Copyright 2006-2016 Frans Kaashoek, Robert Morris, and Russ Cox.
3434

3535
ERROR REPORTS
3636

37-
If you spot errors or have suggestions for improvement, please send email to
38-
Frans Kaashoek and Robert Morris (kaashoek,[email protected]). If you have
39-
suggestions for improvements, please keep in mind that the main purpose of xv6
40-
is as a teaching operating system for MIT's 6.828. For example, we are in
41-
particular interested in simplifications and clarifications, instead of
42-
suggestions for new systems calls, more portability, etc.
37+
Please send errors and suggestions to Frans Kaashoek and Robert Morris
38+
(kaashoek,[email protected]). The main purpose of xv6 is as a teaching
39+
operating system for MIT's 6.828, so we are more interested in
40+
simplifications and clarifications than new features.
4341

4442
BUILDING AND RUNNING XV6
4543

46-
To build xv6 on an x86 ELF machine (like Linux or FreeBSD), run "make".
47-
On non-x86 or non-ELF machines (like OS X, even on x86), you will
48-
need to install a cross-compiler gcc suite capable of producing x86 ELF
49-
binaries. See http://pdos.csail.mit.edu/6.828/2016/tools.html.
50-
Then run "make TOOLPREFIX=i386-jos-elf-".
51-
52-
To run xv6, install the QEMU PC simulators. To run in QEMU, run "make qemu".
53-
54-
To create a typeset version of the code, run "make xv6.pdf". This
55-
requires the "mpage" utility. See http://www.mesa.nl/pub/mpage/.
44+
To build xv6 on an x86 ELF machine (like Linux or FreeBSD), run
45+
"make". On non-x86 or non-ELF machines (like OS X, even on x86), you
46+
will need to install a cross-compiler gcc suite capable of producing
47+
x86 ELF binaries. See http://pdos.csail.mit.edu/6.828/2016/tools.html.
48+
Then run "make TOOLPREFIX=i386-jos-elf-". Now install the QEMU PC
49+
simulator and run "make qemu".

elf.h

-3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,3 @@ struct proghdr {
4040
#define ELF_PROG_FLAG_EXEC 1
4141
#define ELF_PROG_FLAG_WRITE 2
4242
#define ELF_PROG_FLAG_READ 4
43-
44-
//PAGEBREAK!
45-
// Blank page.

file.h

-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@ struct devsw {
3535
extern struct devsw devsw[];
3636

3737
#define CONSOLE 1
38-
39-
//PAGEBREAK!
40-
// Blank page.

fs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ bfree(int dev, uint b)
155155
// have locked the inodes involved; this lets callers create
156156
// multi-step atomic operations.
157157
//
158-
// The icache.lock spin-lock defends the allocation of icache
158+
// The icache.lock spin-lock protects the allocation of icache
159159
// entries. Since ip->ref indicates whether an entry is free,
160160
// and ip->dev and ip->inum indicate which i-node an entry
161161
// holds, one must hold icache.lock while using any of those fields.
162162
//
163-
// An ip->lock sleep-lock defends all ip-> fields other than ref,
163+
// An ip->lock sleep-lock protects all ip-> fields other than ref,
164164
// dev, and inum. One must hold ip->lock in order to
165165
// read or write that inode's ip->valid, ip->size, ip->type, &c.
166166

kalloc.c

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ freerange(void *vstart, void *vend)
5151
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
5252
kfree(p);
5353
}
54-
5554
//PAGEBREAK: 21
5655
// Free the page of physical memory pointed at by v,
5756
// which normally should have been returned by a

lapic.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343

4444
volatile uint *lapic; // Initialized in mp.c
4545

46+
//PAGEBREAK!
4647
static void
4748
lapicw(int index, int value)
4849
{
4950
lapic[index] = value;
5051
lapic[ID]; // wait for write to finish, by reading
5152
}
52-
//PAGEBREAK!
5353

5454
void
5555
lapicinit(void)

main.c

+4
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,7 @@ pde_t entrypgdir[NPDENTRIES] = {
110110
//PAGEBREAK!
111111
// Blank page.
112112
//PAGEBREAK!
113+
// Blank page.
114+
//PAGEBREAK!
115+
// Blank page.
116+

mmu.h

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
// cpu->gdt[NSEGS] holds the above segments.
5050
#define NSEGS 6
5151

52-
//PAGEBREAK!
5352
#ifndef __ASSEMBLER__
5453
// Segment Descriptor
5554
struct segdesc {

proc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ cpuid() {
3232
return mycpu()-cpus;
3333
}
3434

35-
// Must be called with interrupts disabled to avoid the caller being rescheduled
36-
// between reading lapicid and running through the loop.
35+
// Must be called with interrupts disabled to avoid the caller being
36+
// rescheduled between reading lapicid and running through the loop.
3737
struct cpu*
3838
mycpu(void)
3939
{

trap.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ trap(struct trapframe *tf)
8989
// In user space, assume process misbehaved.
9090
cprintf("pid %d %s: trap %d err %d on cpu %d "
9191
"eip 0x%x addr 0x%x--kill proc\n",
92-
myproc()->pid, myproc()->name, tf->trapno, tf->err, cpuid(), tf->eip,
93-
rcr2());
92+
myproc()->pid, myproc()->name, tf->trapno,
93+
tf->err, cpuid(), tf->eip, rcr2());
9494
myproc()->killed = 1;
9595
}
9696

@@ -102,7 +102,8 @@ trap(struct trapframe *tf)
102102

103103
// Force process to give up CPU on clock tick.
104104
// If interrupts were on while locks held, would need to check nlock.
105-
if(myproc() && myproc()->state == RUNNING && tf->trapno == T_IRQ0+IRQ_TIMER)
105+
if(myproc() && myproc()->state == RUNNING &&
106+
tf->trapno == T_IRQ0+IRQ_TIMER)
106107
yield();
107108

108109
// Check if the process has been killed since we yielded

vm.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ switchuvm(struct proc *p)
164164
panic("switchuvm: no pgdir");
165165

166166
pushcli();
167-
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts, sizeof(mycpu()->ts)-1, 0);
167+
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
168+
sizeof(mycpu()->ts)-1, 0);
168169
mycpu()->gdt[SEG_TSS].s = 0;
169170
mycpu()->ts.ss0 = SEG_KDATA << 3;
170171
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;

0 commit comments

Comments
 (0)