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
616316e1
Commit
616316e1
authored
Dec 16, 2019
by
Amir Hosein Kashani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start of 3.2
parent
a28f288c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
4 deletions
+2
-4
getCountTest.c
getCountTest.c
+1
-3
proc.c
proc.c
+0
-1
proc.h
proc.h
+1
-0
No files found.
getCountTest.c
View file @
616316e1
...
@@ -7,9 +7,7 @@ main(int argc,char **argv)
...
@@ -7,9 +7,7 @@ main(int argc,char **argv)
{
{
int
a
=
4
;
int
a
=
4
;
getChildren
(
a
);
getChildren
(
a
);
getChildren
(
a
);
getChildren
(
a
);
int
test
=
readcommand
(
0
,
command
,
args
);
printf
(
"i find this %d"
,
test
);
int
result
=
getCount
(
22
);
int
result
=
getCount
(
22
);
printf
(
1
,
"--- %d ---"
,
result
);
printf
(
1
,
"--- %d ---"
,
result
);
exit
();
exit
();
...
...
proc.c
View file @
616316e1
...
@@ -342,7 +342,6 @@ scheduler(void)
...
@@ -342,7 +342,6 @@ scheduler(void)
c
->
proc
=
p
;
c
->
proc
=
p
;
switchuvm
(
p
);
switchuvm
(
p
);
p
->
state
=
RUNNING
;
p
->
state
=
RUNNING
;
swtch
(
&
(
c
->
scheduler
),
p
->
context
);
swtch
(
&
(
c
->
scheduler
),
p
->
context
);
switchkvm
();
switchkvm
();
...
...
proc.h
View file @
616316e1
...
@@ -38,6 +38,7 @@ enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };
...
@@ -38,6 +38,7 @@ enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };
struct
proc
{
struct
proc
{
int
usagepointer
;
int
usagepointer
;
int
usage
[
100
];
int
usage
[
100
];
int
priority
;
uint
sz
;
// Size of process memory (bytes)
uint
sz
;
// Size of process memory (bytes)
pde_t
*
pgdir
;
// Page table
pde_t
*
pgdir
;
// Page table
char
*
kstack
;
// Bottom of kernel stack for this process
char
*
kstack
;
// Bottom of kernel stack for this process
...
...
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