Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • y2-rhymansaib/pintos_student
1 result
Select Git revision
  • master
1 result
Show changes
Commits on Source (4)
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
......@@ -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 ();
}