xv6/syscall.c File Reference

#include "types.h"
#include "defs.h"
#include "param.h"
#include "mmu.h"
#include "proc.h"
#include "x86.h"
#include "syscall.h"

Go to the source code of this file.

Functions

int fetchint (struct proc *p, uint addr, int *ip)
int fetchstr (struct proc *p, uint addr, char **pp)
int argint (int n, int *ip)
int argptr (int n, char **pp, int size)
int argstr (int n, char **pp)
int sys_chdir (void)
int sys_close (void)
int sys_dup (void)
int sys_exec (void)
int sys_exit (void)
int sys_fork (void)
int sys_fstat (void)
int sys_getpid (void)
int sys_kill (void)
int sys_link (void)
int sys_mkdir (void)
int sys_mknod (void)
int sys_open (void)
int sys_pipe (void)
int sys_read (void)
int sys_sbrk (void)
int sys_sleep (void)
int sys_unlink (void)
int sys_wait (void)
int sys_write (void)
void syscall (void)

Variables

static int(* syscalls [])(void)


Function Documentation

int argint ( int  n,
int *  ip 
)

int argptr ( int  n,
char **  pp,
int  size 
)

Definition at line 54 of file syscall.c.

References argint().

Referenced by sys_fstat(), sys_pipe(), sys_read(), and sys_write().

int argstr ( int  n,
char **  pp 
)

Definition at line 71 of file syscall.c.

References argint(), and fetchstr().

Referenced by sys_chdir(), sys_exec(), sys_link(), sys_mkdir(), sys_mknod(), sys_open(), and sys_unlink().

int fetchint ( struct proc p,
uint  addr,
int *  ip 
)

Definition at line 17 of file syscall.c.

References proc::mem, and proc::sz.

Referenced by argint(), and sys_exec().

int fetchstr ( struct proc p,
uint  addr,
char **  pp 
)

Definition at line 29 of file syscall.c.

References proc::mem, and proc::sz.

Referenced by argstr(), and sys_exec().

int sys_chdir ( void   ) 

Definition at line 327 of file sysfile.c.

References argstr(), ilock(), iput(), iunlock(), iunlockput(), namei(), T_DIR, and inode::type.

int sys_close ( void   ) 

Definition at line 85 of file sysfile.c.

References argfd(), and fileclose().

int sys_dup ( void   ) 

Definition at line 47 of file sysfile.c.

References argfd(), fdalloc(), and filedup().

int sys_exec ( void   ) 

Definition at line 346 of file sysfile.c.

References argint(), argstr(), argv, exec(), fetchint(), fetchstr(), memset(), and NELEM.

int sys_exit ( void   ) 

Definition at line 15 of file sysproc.c.

References exit().

int sys_fork ( void   ) 

Definition at line 9 of file sysproc.c.

References fork().

int sys_fstat ( void   ) 

Definition at line 98 of file sysfile.c.

References argfd(), argptr(), and filestat().

int sys_getpid ( void   ) 

Definition at line 38 of file sysproc.c.

int sys_kill ( void   ) 

Definition at line 28 of file sysproc.c.

References argint(), and kill().

int sys_link ( void   ) 

int sys_mkdir ( void   ) 

Definition at line 298 of file sysfile.c.

References argstr(), create(), iunlockput(), and T_DIR.

int sys_mknod ( void   ) 

Definition at line 310 of file sysfile.c.

References argint(), argstr(), create(), iunlockput(), inode::major, inode::minor, and T_DEV.

int sys_open ( void   ) 

int sys_pipe ( void   ) 

Definition at line 371 of file sysfile.c.

References argptr(), fdalloc(), fileclose(), and pipealloc().

int sys_read ( void   ) 

Definition at line 61 of file sysfile.c.

References argfd(), argint(), argptr(), and fileread().

int sys_sbrk ( void   ) 

Definition at line 44 of file sysproc.c.

References argint(), and growproc().

int sys_sleep ( void   ) 

Definition at line 58 of file sysproc.c.

References acquire(), argint(), release(), sleep(), ticks, and tickslock.

int sys_unlink ( void   ) 

int sys_wait ( void   ) 

Definition at line 22 of file sysproc.c.

References wait().

int sys_write ( void   ) 

Definition at line 73 of file sysfile.c.

References argfd(), argint(), argptr(), and filewrite().

void syscall ( void   ) 

Definition at line 124 of file syscall.c.

References cprintf(), NELEM, and syscalls.

Referenced by trap().


Variable Documentation

int(* syscalls[])(void) [static]


Generated on Fri Jan 7 12:25:49 2011 for xv6 by  doxygen 1.5.6