summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2017-08-29 14:11:59 -0400
committerRobert Morris <[email protected]>2017-08-29 14:11:59 -0400
commit4638cabf8c52c5f08f83942103f2375d2ed46388 (patch)
tree0ff969a00aac465b9c04866b41697bc3e775f815
parent164f4bae54286e1635b24efa03a1c565b9048b4a (diff)
downloadxv6-labs-4638cabf8c52c5f08f83942103f2375d2ed46388.tar.gz
xv6-labs-4638cabf8c52c5f08f83942103f2375d2ed46388.tar.bz2
xv6-labs-4638cabf8c52c5f08f83942103f2375d2ed46388.zip
fix runoff complaints about pagination and long lines
-rw-r--r--README26
-rw-r--r--elf.h3
-rw-r--r--file.h3
-rw-r--r--fs.c4
-rw-r--r--kalloc.c1
-rw-r--r--lapic.c2
-rw-r--r--main.c4
-rw-r--r--mmu.h1
-rw-r--r--proc.c4
-rw-r--r--trap.c7
-rw-r--r--vm.c3
11 files changed, 25 insertions, 33 deletions
diff --git a/README b/README
index 205bf6b..b82e8d2 100644
--- a/README
+++ b/README
@@ -34,22 +34,16 @@ Copyright 2006-2016 Frans Kaashoek, Robert Morris, and Russ Cox.
ERROR REPORTS
-If you spot errors or have suggestions for improvement, please send email to
-Frans Kaashoek and Robert Morris (kaashoek,[email protected]). If you have
-suggestions for improvements, please keep in mind that the main purpose of xv6
-is as a teaching operating system for MIT's 6.828. For example, we are in
-particular interested in simplifications and clarifications, instead of
-suggestions for new systems calls, more portability, etc.
+Please send errors and suggestions to Frans Kaashoek and Robert Morris
+(kaashoek,[email protected]). The main purpose of xv6 is as a teaching
+operating system for MIT's 6.828, so we are more interested in
+simplifications and clarifications than new features.
BUILDING AND RUNNING XV6
-To build xv6 on an x86 ELF machine (like Linux or FreeBSD), run "make".
-On non-x86 or non-ELF machines (like OS X, even on x86), you will
-need to install a cross-compiler gcc suite capable of producing x86 ELF
-binaries. See http://pdos.csail.mit.edu/6.828/2016/tools.html.
-Then run "make TOOLPREFIX=i386-jos-elf-".
-
-To run xv6, install the QEMU PC simulators. To run in QEMU, run "make qemu".
-
-To create a typeset version of the code, run "make xv6.pdf". This
-requires the "mpage" utility. See http://www.mesa.nl/pub/mpage/.
+To build xv6 on an x86 ELF machine (like Linux or FreeBSD), run
+"make". On non-x86 or non-ELF machines (like OS X, even on x86), you
+will need to install a cross-compiler gcc suite capable of producing
+x86 ELF binaries. See http://pdos.csail.mit.edu/6.828/2016/tools.html.
+Then run "make TOOLPREFIX=i386-jos-elf-". Now install the QEMU PC
+simulator and run "make qemu".
diff --git a/elf.h b/elf.h
index 7994abf..d16c967 100644
--- a/elf.h
+++ b/elf.h
@@ -40,6 +40,3 @@ struct proghdr {
#define ELF_PROG_FLAG_EXEC 1
#define ELF_PROG_FLAG_WRITE 2
#define ELF_PROG_FLAG_READ 4
-
-//PAGEBREAK!
-// Blank page.
diff --git a/file.h b/file.h
index 497a58a..0990c82 100644
--- a/file.h
+++ b/file.h
@@ -35,6 +35,3 @@ struct devsw {
extern struct devsw devsw[];
#define CONSOLE 1
-
-//PAGEBREAK!
-// Blank page.
diff --git a/fs.c b/fs.c
index 1ada466..feb59fe 100644
--- a/fs.c
+++ b/fs.c
@@ -155,12 +155,12 @@ bfree(int dev, uint b)
// have locked the inodes involved; this lets callers create
// multi-step atomic operations.
//
-// The icache.lock spin-lock defends the allocation of icache
+// The icache.lock spin-lock protects the allocation of icache
// entries. Since ip->ref indicates whether an entry is free,
// and ip->dev and ip->inum indicate which i-node an entry
// holds, one must hold icache.lock while using any of those fields.
//
-// An ip->lock sleep-lock defends all ip-> fields other than ref,
+// An ip->lock sleep-lock protects all ip-> fields other than ref,
// dev, and inum. One must hold ip->lock in order to
// read or write that inode's ip->valid, ip->size, ip->type, &c.
diff --git a/kalloc.c b/kalloc.c
index 428c639..14cd4f4 100644
--- a/kalloc.c
+++ b/kalloc.c
@@ -51,7 +51,6 @@ freerange(void *vstart, void *vend)
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
kfree(p);
}
-
//PAGEBREAK: 21
// Free the page of physical memory pointed at by v,
// which normally should have been returned by a
diff --git a/lapic.c b/lapic.c
index dc69eb6..2b71987 100644
--- a/lapic.c
+++ b/lapic.c
@@ -43,13 +43,13 @@
volatile uint *lapic; // Initialized in mp.c
+//PAGEBREAK!
static void
lapicw(int index, int value)
{
lapic[index] = value;
lapic[ID]; // wait for write to finish, by reading
}
-//PAGEBREAK!
void
lapicinit(void)
diff --git a/main.c b/main.c
index 6bdeab4..774ed54 100644
--- a/main.c
+++ b/main.c
@@ -110,3 +110,7 @@ pde_t entrypgdir[NPDENTRIES] = {
//PAGEBREAK!
// Blank page.
//PAGEBREAK!
+// Blank page.
+//PAGEBREAK!
+// Blank page.
+
diff --git a/mmu.h b/mmu.h
index a1afa9f..7b63db0 100644
--- a/mmu.h
+++ b/mmu.h
@@ -49,7 +49,6 @@
// cpu->gdt[NSEGS] holds the above segments.
#define NSEGS 6
-//PAGEBREAK!
#ifndef __ASSEMBLER__
// Segment Descriptor
struct segdesc {
diff --git a/proc.c b/proc.c
index aac7523..806b1b1 100644
--- a/proc.c
+++ b/proc.c
@@ -32,8 +32,8 @@ cpuid() {
return mycpu()-cpus;
}
-// Must be called with interrupts disabled to avoid the caller being rescheduled
-// between reading lapicid and running through the loop.
+// Must be called with interrupts disabled to avoid the caller being
+// rescheduled between reading lapicid and running through the loop.
struct cpu*
mycpu(void)
{
diff --git a/trap.c b/trap.c
index b5eba82..41c66eb 100644
--- a/trap.c
+++ b/trap.c
@@ -89,8 +89,8 @@ trap(struct trapframe *tf)
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
"eip 0x%x addr 0x%x--kill proc\n",
- myproc()->pid, myproc()->name, tf->trapno, tf->err, cpuid(), tf->eip,
- rcr2());
+ myproc()->pid, myproc()->name, tf->trapno,
+ tf->err, cpuid(), tf->eip, rcr2());
myproc()->killed = 1;
}
@@ -102,7 +102,8 @@ trap(struct trapframe *tf)
// Force process to give up CPU on clock tick.
// If interrupts were on while locks held, would need to check nlock.
- if(myproc() && myproc()->state == RUNNING && tf->trapno == T_IRQ0+IRQ_TIMER)
+ if(myproc() && myproc()->state == RUNNING &&
+ tf->trapno == T_IRQ0+IRQ_TIMER)
yield();
// Check if the process has been killed since we yielded
diff --git a/vm.c b/vm.c
index 42102a6..3f71b6a 100644
--- a/vm.c
+++ b/vm.c
@@ -164,7 +164,8 @@ switchuvm(struct proc *p)
panic("switchuvm: no pgdir");
pushcli();
- mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts, sizeof(mycpu()->ts)-1, 0);
+ mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
+ sizeof(mycpu()->ts)-1, 0);
mycpu()->gdt[SEG_TSS].s = 0;
mycpu()->ts.ss0 = SEG_KDATA << 3;
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;