Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pintos_Group13
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m2-almarri
Pintos_Group13
Compare revisions
master to 63f26e4afb0c160a76d2359a0f252fbdffb3ddbf
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
m2-almarri/pintos_g13
Select target project
No results found
63f26e4afb0c160a76d2359a0f252fbdffb3ddbf
Select Git revision
Branches
master
1 result
Swap
Target
ty-win/pintos_student
Select target project
y2-rhymansaib/pintos_student
1 result
master
Select Git revision
Branches
master
1 result
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (4)
First edit getting started
· 042a2933
m2-almarri
authored
1 year ago
042a2933
Update syscall.c added halt
· ca43d8ce
m2-almarri
authored
1 year ago
ca43d8ce
added } for switch
· ccf1e008
m2-almarri
authored
1 year ago
ccf1e008
added syscall list and numbers from syscall-nr.h
· 63f26e4a
m2-almarri
authored
1 year ago
63f26e4a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
src/userprog/syscall.c
+46
-0
46 additions, 0 deletions
src/userprog/syscall.c
with
48 additions
and
0 deletions
README.md
View file @
63f26e4a
This is a variant of the Pintos Operating System for use as part of Operating Systems module at the University of the West of England (UWE).
#this is the first edit By Mohamed2.Almarri@live.uwe.ac.uk
This diff is collapsed.
Click to expand it.
src/userprog/syscall.c
View file @
63f26e4a
...
...
@@ -11,11 +11,57 @@ syscall_init (void)
{
intr_register_int
(
0x30
,
3
,
INTR_ON
,
syscall_handler
,
"syscall"
);
}
/* from lib/syscall-nr.h
system calls numbers are
SYS_HALT, 0
SYS_EXIT, 1
SYS_EXEC, 2
SYS_WAIT, 3
SYS_CREATE, 4
SYS_REMOVE, 5
SYS_OPEN, 6
SYS_FILESIZE, 7
SYS_READ, 8
SYS_WRITE, 9
SYS_SEEK, 10
SYS_TELL, 11
SYS_CLOSE, 12
these are used for the case instead of number
*/
static
void
syscall_handler
(
struct
intr_frame
*
f
UNUSED
)
{
printf
(
"system call!
\n
"
);
int
syscall_nr
=-
1
;
switch
(
syscall_nr
)
{
case
SYS_HALT
:{
printf
(
"system call, halt
\n
"
);
shutdown_power_off
();
break
;
}
/*
// each team member should select on syscall.
// develop one from the cw document
case SYS_EXIT:{
//to be developed
break;
}
case SYS_EXEC:{
//to be developed
break;
}
case SYS_WAIT:{
//to be developed
break;
}
case SYS_WAIT:{
//to be developed
break;
}
*/
thread_exit
();
}
This diff is collapsed.
Click to expand it.