Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
OS_XV6
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9631059
OS_XV6
Commits
c9a111a5
Commit
c9a111a5
authored
Dec 17, 2019
by
Amir Hosein Kashani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after heavy problem solved
parent
117b810a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
2 deletions
+4
-2
proc.c
proc.c
+1
-0
proc.h
proc.h
+1
-1
sysproc.c
sysproc.c
+1
-1
trap.c
trap.c
+1
-0
No files found.
proc.c
View file @
c9a111a5
...
@@ -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
;
...
...
proc.h
View file @
c9a111a5
...
@@ -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
...
...
sysproc.c
View file @
c9a111a5
...
@@ -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
;
...
...
trap.c
View file @
c9a111a5
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment