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
837b5275
Commit
837b5275
authored
Dec 15, 2019
by
Amir Hosein Kashani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.2 middle
parent
e56c6048
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
proc.h
proc.h
+2
-0
syscall.c
syscall.c
+2
-0
No files found.
proc.h
View file @
837b5275
...
...
@@ -36,6 +36,8 @@ enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };
// Per-process state
struct
proc
{
int
usagepointer
;
int
usage
[
100
];
uint
sz
;
// Size of process memory (bytes)
pde_t
*
pgdir
;
// Page table
char
*
kstack
;
// Bottom of kernel stack for this process
...
...
syscall.c
View file @
837b5275
...
...
@@ -139,6 +139,8 @@ syscall(void)
num
=
curproc
->
tf
->
eax
;
if
(
num
>
0
&&
num
<
NELEM
(
syscalls
)
&&
syscalls
[
num
])
{
curproc
->
tf
->
eax
=
syscalls
[
num
]();
myproc
()
->
usage
[
myproc
()
->
usagepointer
]
=
num
;
// we have an array include all of the usage of another process
myproc
()
->
usagepointer
++
;
//add to config the head of array
}
else
{
cprintf
(
"%d %s: unknown sys call %d
\n
"
,
curproc
->
pid
,
curproc
->
name
,
num
);
...
...
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