Commit c9a111a5 authored by Amir Hosein Kashani's avatar Amir Hosein Kashani

after heavy problem solved

parent 117b810a
...@@ -322,6 +322,7 @@ wait(void) ...@@ -322,6 +322,7 @@ wait(void)
void void
scheduler(void) scheduler(void)
{ {
extern int cpuMode;
struct proc *p; struct proc *p;
struct cpu *c = mycpu(); struct cpu *c = mycpu();
struct proc *p1; struct proc *p1;
......
...@@ -12,7 +12,7 @@ struct cpu { ...@@ -12,7 +12,7 @@ struct cpu {
extern struct cpu cpus[NCPU]; extern struct cpu cpus[NCPU];
extern int ncpu; extern int ncpu;
extern int cpuMode;// this field show how schedule system use int cpuMode;// this field show how schedule system use
//PAGEBREAK: 17 //PAGEBREAK: 17
......
...@@ -140,7 +140,7 @@ sys_getCount(int find){ ...@@ -140,7 +140,7 @@ sys_getCount(int find){
//3.2 //3.2
int int
changePriority(int newPriority){ sys_changePriority(int newPriority){
argint(0,&newPriority); argint(0,&newPriority);
if(newPriority > 5 || newPriority < 0){ if(newPriority > 5 || newPriority < 0){
return -1; return -1;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
// Interrupt descriptor table (shared by all CPUs). // Interrupt descriptor table (shared by all CPUs).
struct gatedesc idt[256]; struct gatedesc idt[256];
extern uint vectors[]; // in vectors.S: array of 256 entry pointers extern uint vectors[]; // in vectors.S: array of 256 entry pointers
extern int cpuMode; // kashani
struct spinlock tickslock; struct spinlock tickslock;
uint ticks; uint ticks;
int currentQuantom ; //show us how many quantom passed in this procces int currentQuantom ; //show us how many quantom passed in this procces
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment