sysproc.c
int
sys_mprotect(void)
{
  //do something for arguments
  char *addr;
  int len;
  if(argstr(0, &addr) < 0 || argint(1, &len) < 0)
	return -1;
  if(mprotect(addr, len))
	  return -1;
  return 0;
}
//changing protection level of some pages to be
//read-only
//returns 0 if successfull
changing protection level of some pages to be
read-only
returns 0 if successfull
changing protection level of some pages to be read - only returns 0 if successfull
int
sys_mprotect(void)
{
  char *addr;
  int len;
  if(argstr(0, &addr) < 0 || argint(1, &len) < 0)
	return -1;
  if(mprotect(addr, len))
	  return -1;
  return 0;
}
int sys_mprotect ( void ) { char * addr ; int len ; if ( argstr ( 0 , & addr ) < 0 || argint ( 1 , & len ) < 0 ) return -1 ; if ( mprotect ( addr , len ) ) return -1 ; return 0 ; }
changing protection level of some pages to be
read-only
returns 0 if successfull
changing protection level of some pages to be read - only returns 0 if successfull
//do something for arguments