Skip to content

Commit

Permalink
Merge "Header guards and missing includes addition."
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsaOpenu authored and gerritforge-ltd committed Aug 11, 2019
2 parents 588bca9 + d5b0a50 commit dbcdb77
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mmu.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef XV6_MMU_H
#define XV6_MMU_H

// This file contains definitions for the
// x86 memory management unit (MMU).

Expand Down Expand Up @@ -226,3 +229,5 @@ struct gatedesc {
}

#endif

#endif
5 changes: 5 additions & 0 deletions param.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef XV6_PARAM_H
#define XV6_PARAM_H

#define NPROC 64 // maximum number of processes
#define KSTACKSIZE 4096 // size of per-process kernel stack
#define NCPU 8 // maximum number of CPUs
Expand All @@ -13,3 +16,5 @@
#define FSSIZE 2000 // size of file system in blocks
#define INT_FSSIZE 80 // size of internal file systems in blocks
#define NNAMESPACE 20 // maximum number of namespaces

#endif
8 changes: 8 additions & 0 deletions proc.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#include "types.h"
#include "mmu.h"

#ifndef XV6_PROC_H
#define XV6_PROC_H

// Per-CPU state
struct cpu {
uchar apicid; // Local APIC ID
Expand Down Expand Up @@ -85,3 +91,5 @@ void proc_unlock();
// original data and bss
// fixed-size stack
// expandable heap

#endif
5 changes: 5 additions & 0 deletions types.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#ifndef XV6_TYPES_H
#define XV6_TYPES_H

typedef unsigned int uint;
typedef unsigned short ushort;
typedef unsigned char uchar;
typedef uint pde_t;

#endif

0 comments on commit dbcdb77

Please sign in to comment.