]> Devi Nivas Git - cs3210-lab0.git/commitdiff
fix runoff complaints about pagination and long lines
authorRobert Morris <rtm@csail.mit.edu>
Tue, 29 Aug 2017 18:11:59 +0000 (14:11 -0400)
committerRobert Morris <rtm@csail.mit.edu>
Tue, 29 Aug 2017 18:11:59 +0000 (14:11 -0400)
README
elf.h
file.h
fs.c
kalloc.c
lapic.c
main.c
mmu.h
proc.c
trap.c
vm.c

diff --git a/README b/README
index 205bf6ba1d31485bfa7840483d6bc243d8634136..b82e8d2bf24aa5b2a9bead04158c7c99cdbd60fa 100644 (file)
--- 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,rtm@csail.mit.edu).  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,rtm@mit.edu). 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 7994abf840761be0de9c6da3a42fd8cc89540229..d16c96753a47a194587b86868bc4b2481aa8fef5 100644 (file)
--- 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 497a58a5fc62e4d290bd1cbd4b2e405f6b0e5a82..0990c82f46fb8690afbec1ec99ab0bb2e93df79a 100644 (file)
--- 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 1ada466b109040117dae595d8ae3641b192f3b5a..feb59fea732ff6b7270c6a52488d5e92b5363e5b 100644 (file)
--- 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.
 
index 428c6395ff30ae33c6ff849dd1e891e11c6a48c5..14cd4f43f254a408856c502160a6bb02a2e53a6e 100644 (file)
--- 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 dc69eb6b94f022cf468156cbe2f911ffb0e80d06..2b71987c1f200bc08f285de1d131481e8f062929 100644 (file)
--- a/lapic.c
+++ b/lapic.c
 
 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 6bdeab4e03c71f3bdf4475bdf15c4988bbfe2ef2..774ed5467cea421576b75a885879ff85bd4904d2 100644 (file)
--- 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 a1afa9f7d07b44ac46942811aaec642d8c40383d..7b63db08c467ba1015fbf4c310884aa5186aa7ce 100644 (file)
--- 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 aac752309a7ac3a65ae8d97c708d2bca1de4097c..806b1b184b4e8333eb29f418157c96651b1f724f 100644 (file)
--- 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 b5eba82408d066574a395d1b597e0d641269c0a1..41c66ebf9adeb28ba9b58edaff9592b14d989d96 100644 (file)
--- 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 42102a64d48eac4f071026bc98bd6bcace3e6b48..3f71b6a7e3e2ea2feae2c268080793b4d0f83485 100644 (file)
--- 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;