diff options
| author | Robert Morris <rtm@csail.mit.edu> | 2019-07-24 13:33:43 -0400 | 
|---|---|---|
| committer | Robert Morris <rtm@csail.mit.edu> | 2019-07-24 13:33:43 -0400 | 
| commit | a77287e9244ae5dac7060c0b8817bc195325af0c (patch) | |
| tree | fbf856ce361a9bc75abe4c484ecaff324607dd71 | |
| parent | b4f89bb5290cff5926e5a735487b024f8314e028 (diff) | |
| download | xv6-labs-a77287e9244ae5dac7060c0b8817bc195325af0c.tar.gz xv6-labs-a77287e9244ae5dac7060c0b8817bc195325af0c.tar.bz2 xv6-labs-a77287e9244ae5dac7060c0b8817bc195325af0c.zip | |
no more PAGEBREAK
| -rw-r--r-- | kernel/bio.c | 4 | ||||
| -rw-r--r-- | kernel/console.c | 3 | ||||
| -rw-r--r-- | kernel/defs.h | 1 | ||||
| -rw-r--r-- | kernel/file.c | 1 | ||||
| -rw-r--r-- | kernel/fs.c | 6 | ||||
| -rw-r--r-- | kernel/kalloc.c | 4 | ||||
| -rw-r--r-- | kernel/pipe.c | 2 | ||||
| -rw-r--r-- | kernel/proc.c | 3 | ||||
| -rw-r--r-- | kernel/proc.h | 2 | ||||
| -rw-r--r-- | kernel/sysfile.c | 1 | ||||
| -rw-r--r-- | kernel/vm.c | 10 | 
11 files changed, 7 insertions, 30 deletions
| diff --git a/kernel/bio.c b/kernel/bio.c index 41e3d1f..a08884b 100644 --- a/kernel/bio.c +++ b/kernel/bio.c @@ -43,7 +43,6 @@ binit(void)    initlock(&bcache.lock, "bcache"); -//PAGEBREAK!    // Create linked list of buffers    bcache.head.prev = &bcache.head;    bcache.head.next = &bcache.head; @@ -140,6 +139,3 @@ brelse(struct buf *b)    release(&bcache.lock);  } -//PAGEBREAK! -// Blank page. - diff --git a/kernel/console.c b/kernel/console.c index 736d96a..fe21405 100644 --- a/kernel/console.c +++ b/kernel/console.c @@ -59,9 +59,6 @@ printptr(uint64 x) {      consputc(digits[x >> (sizeof(uint64) * 8 - 4)]);  } - -//PAGEBREAK: 50 -  // Print to the console. only understands %d, %x, %p, %s.  void  printf(char *fmt, ...) diff --git a/kernel/defs.h b/kernel/defs.h index 2b082a3..926b138 100644 --- a/kernel/defs.h +++ b/kernel/defs.h @@ -101,7 +101,6 @@ void            pipeclose(struct pipe*, int);  int             piperead(struct pipe*, uint64, int);  int             pipewrite(struct pipe*, uint64, int); -//PAGEBREAK: 16  // proc.c  int             cpuid(void);  void            exit(void); diff --git a/kernel/file.c b/kernel/file.c index f330cf1..7663476 100644 --- a/kernel/file.c +++ b/kernel/file.c @@ -127,7 +127,6 @@ fileread(struct file *f, uint64 addr, int n)    return r;  } -//PAGEBREAK!  // Write to file f.  // addr is a user virtual address.  int diff --git a/kernel/fs.c b/kernel/fs.c index c241b3c..98284e8 100644 --- a/kernel/fs.c +++ b/kernel/fs.c @@ -186,7 +186,6 @@ iinit(int dev)  static struct inode* iget(uint dev, uint inum); -//PAGEBREAK!  // Allocate an inode on device dev.  // Mark it as allocated by  giving it type type.  // Returns an unlocked but allocated and referenced inode. @@ -363,7 +362,6 @@ iunlockput(struct inode *ip)    iput(ip);  } -//PAGEBREAK!  // Inode content  //  // The content (data) associated with each inode is stored @@ -450,7 +448,6 @@ stati(struct inode *ip, struct stat *st)    st->size = ip->size;  } -//PAGEBREAK!  // Read data from inode.  // Caller must hold ip->lock.  // If user_dst==1, then dst is a user virtual address; @@ -476,7 +473,6 @@ readi(struct inode *ip, int user_dst, uint64 dst, uint off, uint n)    return n;  } -// PAGEBREAK!  // Write data to inode.  // Caller must hold ip->lock.  // If user_src==1, then src is a user virtual address; @@ -508,7 +504,6 @@ writei(struct inode *ip, int user_src, uint64 src, uint off, uint n)    return n;  } -//PAGEBREAK!  // Directories  int @@ -575,7 +570,6 @@ dirlink(struct inode *dp, char *name, uint inum)    return 0;  } -//PAGEBREAK!  // Paths  // Copy the next path element from path into name. diff --git a/kernel/kalloc.c b/kernel/kalloc.c index d72e0ab..d95531b 100644 --- a/kernel/kalloc.c +++ b/kernel/kalloc.c @@ -1,5 +1,5 @@  // Physical memory allocator, intended to allocate -// memory for user processes, kernel stacks, page table pages, +// memory for user processes, kernel stacks, page-table pages,  // and pipe buffers. Allocates 4096-byte pages.  #include "types.h" @@ -39,7 +39,7 @@ freerange(void *pa_start, void *pa_end)    for(; p + PGSIZE <= (char*)pa_end; p += PGSIZE)      kfree(p);  } -//PAGEBREAK: 21 +  // Free the page of physical memory pointed at by v,  // which normally should have been returned by a  // call to kalloc().  (The exception is when diff --git a/kernel/pipe.c b/kernel/pipe.c index 2fcb2ee..c3a8acf 100644 --- a/kernel/pipe.c +++ b/kernel/pipe.c @@ -45,7 +45,6 @@ pipealloc(struct file **f0, struct file **f1)    (*f1)->pipe = pi;    return 0; -//PAGEBREAK: 20   bad:    if(pi)      kfree((char*)pi); @@ -74,7 +73,6 @@ pipeclose(struct pipe *pi, int writable)      release(&pi->lock);  } -//PAGEBREAK: 40  int  pipewrite(struct pipe *pi, uint64 addr, int n)  { diff --git a/kernel/proc.c b/kernel/proc.c index 5ce31c7..57cefe4 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -83,7 +83,6 @@ allocpid() {    return pid;  } -//PAGEBREAK: 32  // Look in the process table for an UNUSED proc.  // If found, initialize state required to run in the kernel,  // and return with p->lock held. @@ -192,7 +191,6 @@ uchar initcode[] = {    0x00, 0x00, 0x00  }; -//PAGEBREAK: 32  // Set up first user process.  void  userinit(void) @@ -405,7 +403,6 @@ wait(void)    }  } -//PAGEBREAK: 42  // Per-CPU process scheduler.  // Each CPU calls scheduler() after setting itself up.  // Scheduler never returns.  It loops, doing: diff --git a/kernel/proc.h b/kernel/proc.h index 0b358aa..d515043 100644 --- a/kernel/proc.h +++ b/kernel/proc.h @@ -28,8 +28,6 @@ struct cpu {  extern struct cpu cpus[NCPU]; -//PAGEBREAK: 17 -  // per-process data for the trap handling code in trampoline.S.  // sits in a page by itself just under the trampoline page in the  // user page table. not specially mapped in the kernel page table. diff --git a/kernel/sysfile.c b/kernel/sysfile.c index 533e097..2c787ec 100644 --- a/kernel/sysfile.c +++ b/kernel/sysfile.c @@ -181,7 +181,6 @@ isdirempty(struct inode *dp)    return 1;  } -//PAGEBREAK!  uint64  sys_unlink(void)  { diff --git a/kernel/vm.c b/kernel/vm.c index b327b94..5063956 100644 --- a/kernel/vm.c +++ b/kernel/vm.c @@ -60,10 +60,10 @@ kvminithart()  // Return the address of the PTE in page table pagetable  // that corresponds to virtual address va.  If alloc!=0, -// create any required page table pages. +// create any required page-table pages.  // -// The risc-v Sv39 scheme has three levels of page table -// pages. A page table page contains 512 64-bit PTEs. +// The risc-v Sv39 scheme has three levels of page-table +// pages. A page-table page contains 512 64-bit PTEs.  // A 64-bit virtual address is split into five fields:  //   39..63 -- must be zero.  //   30..38 -- 9 bits of level-2 index. @@ -249,7 +249,7 @@ uvmdealloc(pagetable_t pagetable, uint64 oldsz, uint64 newsz)    return newsz;  } -// Recursively free page table pages. +// Recursively free page-table pages.  // All leaf mappings must already have been removed.  static void  freewalk(pagetable_t pagetable) @@ -270,7 +270,7 @@ freewalk(pagetable_t pagetable)  }  // Free user memory pages, -// then free page table pages. +// then free page-table pages.  void  uvmfree(pagetable_t pagetable, uint64 sz)  { | 
