UbixOS V2 2.0

Data Structures | Macros | Typedefs | Functions
sysproto_posix.h File Reference
`#include <sys/signal.h>`
`#include <sys/thread.h>`
`#include <vfs/file.h>`
Include dependency graph for sysproto_posix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | access_args
struct | close_args
struct | fcntl_args
struct | getdtablesize_args
struct | getgid_args
struct | getpid_args
struct | gettimeofday_args
struct | getuid_args
struct | ioctl_args
struct | mprotect_args
struct | obreak_args
struct | pipe_args
struct | read_args
struct | readlink_args
struct | setitimer_args
struct | sigaction_args
struct | sigprocmask_args
struct | sys_access_args
struct | sys_chdir_args
struct | sys_close_args
struct | sys_dup2_args
struct | sys_execve_args
struct | sys_exit_args
struct | sys_fchdir_args
struct | sys_fclose_args
struct | sys_fcntl_args
struct | sys_fgetc_args
struct | sys_fopen_args
struct | sys_fork_args
struct | sys_fread_args
struct | sys_fseek_args
struct | sys_fstat_args
struct | sys_fstatat_args
struct | sys_fstatfs_args
struct | sys_getcwd_args
struct | sys_getdirentries_args
struct | sys_getegid_args
struct | sys_geteuid_args
struct | sys_getlogin_args
struct | sys_getpgrp_args
struct | sys_getpid_args
struct | sys_getppid_args
struct | sys_getrlimit_args
struct | sys_gettimeofday_args
struct | sys_ioctl_args
struct | sys_issetugid_args
struct | sys_lseek_args
struct | sys_lstat_args
struct | sys_mmap_args
struct | sys_munmap_args
struct | sys_open_args
struct | sys_openat_args
struct | sys_pipe2_args
struct | sys_pread_args
struct | sys_read_args
struct | sys_readlink_args
struct | sys_rename_args
struct | sys_select_args
struct | sys_sendto_args
struct | sys_setGID_args
struct | sys_setlogin_args
struct | sys_setpgid_args
struct | sys_setrlimit_args
struct | sys_setsockopt_args
struct | sys_setUID_args
struct | sys_sigaction_args
struct | sys_sigprocmask_args
struct | sys_socket_args
struct | sys_stat_args
struct | sys_statfs_args
struct | sys_sysarch_args
struct | sys_sysctl_args
struct | sys_wait4_args
struct | sys_write_args
struct | sysctl_args

## Macros
#define | PAD_(t) (sizeof(register_t) <= sizeof(t) ? 0 : sizeof(register_t) - sizeof(t))
#define | PADL_(t) 0
#define | PADR_(t) PAD_(t)

## Typedefs
typedef int | register_t

## Functions
int | access (struct thread *td, struct access_args *uap)
int | fstatfs (struct thread *td, struct sys_fstatfs_args *uap)
int | mprotect (struct thread *td, struct mprotect_args *uap)
int | setitimer (struct thread *td, struct setitimer_args *uap)
| place holder for now functionality to be added later More...
int | sys_access (struct thread *td, struct sys_access_args *)
int | sys_chdir (struct thread *td, struct sys_chdir_args *)
int | sys_close (struct thread *td, struct sys_close_args *)
int | sys_dup2 (struct thread *, struct sys_dup2_args *)
int | sys_execve (struct thread *td, struct sys_execve_args *)
int | sys_exit (struct thread *, struct sys_exit_args *)
int | sys_fchdir (struct thread *td, struct sys_fchdir_args *)
int | sys_fclose (struct thread *td, struct sys_fclose_args *)
int | sys_fcntl (struct thread *td, struct sys_fcntl_args *)
int | sys_fgetc (struct thread *td, struct sys_fgetc_args *)
int | sys_fopen (struct thread *td, struct sys_fopen_args *)
int | sys_fork (struct thread *, struct sys_fork_args *)
int | sys_fread (struct thread *td, struct sys_fread_args *)
int | sys_fseek (struct thread *td, struct sys_fseek_args *)
int | sys_fstat (struct thread *td, struct sys_fstat_args *)
int | sys_fstatat (struct thread *td, struct sys_fstatat_args *)
int | sys_fstatfs (struct thread *td, struct sys_fstatfs_args *)
int | sys_getcwd (struct thread *td, struct sys_getcwd_args *)
int | sys_getdirentries (struct thread *td, struct sys_getdirentries_args *)
int | sys_getegid (struct thread *td, struct sys_getegid_args *)
int | sys_geteuid (struct thread *td, struct sys_geteuid_args *)
int | sys_getGID (struct thread *td, void *)
int | sys_getlogin (struct thread *, struct sys_getlogin_args *)
int | sys_getpgrp (struct thread *td, struct sys_getpgrp_args *)
int | sys_getpid (struct thread *td, struct sys_getpid_args *)
int | sys_getppid (struct thread *td, struct sys_getppid_args *)
int | sys_getrlimit (struct thread *, struct sys_getrlimit_args *)
int | sys_gettimeofday (struct thread *td, struct sys_gettimeofday_args *)
int | sys_getUID (struct thread *td, void *)
int | sys_invalid (struct thread *, void *)
int | sys_ioctl (struct thread *td, struct sys_ioctl_args *)
int | sys_issetugid (struct thread *td, struct sys_issetugid_args *)
int | sys_lseek (struct thread *td, struct sys_lseek_args *)
int | sys_lstat (struct thread *td, struct sys_lstat_args *)
int | sys_mmap (struct thread *td, struct sys_mmap_args *)
int | sys_munmap (struct thread *td, struct sys_munmap_args *)
int | sys_open (struct thread *td, struct sys_open_args *)
int | sys_openat (struct thread *td, struct sys_openat_args *)
int | sys_pipe2 (struct thread *, struct sys_pipe2_args *)
int | sys_pread (struct thread *td, struct sys_pread_args *)
int | sys_read (struct thread *, struct sys_read_args *)
int | sys_readlink (struct thread *, struct sys_readlink_args *)
int | sys_rename (struct thread *td, struct sys_rename_args *)
int | sys_sched_yield (struct thread *td, void *)
int | sys_select (struct thread *td, struct sys_select_args *)
int | sys_sendto (struct thread *td, struct sys_sendto_args *)
int | sys_setGID (struct thread *td, struct sys_setGID_args *)
int | sys_setlogin (struct thread *, struct sys_setlogin_args *)
int | sys_setpgid (struct thread *td, struct sys_setpgid_args *)
int | sys_setpgrp (struct thread *td, struct sys_setpgid_args *)
int | sys_setrlimit (struct thread *, struct sys_setrlimit_args *)
int | sys_setsockopt (struct thread *td, struct sys_setsockopt_args *)
int | sys_setUID (struct thread *td, struct sys_setUID_args *)
int | sys_sigaction (struct thread *td, struct sys_sigaction_args *)
int | sys_sigprocmask (struct thread *td, struct sys_sigprocmask_args *)
int | sys_socket (struct thread *td, struct sys_socket_args *)
int | sys_stat (struct thread *td, struct sys_stat_args *)
int | sys_statfs (struct thread *td, struct sys_statfs_args *args)
int | sys_sysarch (struct thread *td, struct sys_sysarch_args *)
int | sys_sysctl (struct thread *td, struct sys_sysctl_args *)
int | sys_wait4 (struct thread *td, struct sys_wait4_args *)
int | sys_write (struct thread *td, struct sys_write_args *)

## Macro Definition Documentation

## ◆ PAD_

#define PAD_ | ( |  | t | ) | (sizeof(register_t) <= sizeof(t) ? 0 : sizeof(register_t) - sizeof(t))

Definition at line 40 of file sysproto_posix.h.

## ◆ PADL_

#define PADL_ | ( |  | t | ) | 0

Definition at line 43 of file sysproto_posix.h.

## ◆ PADR_

#define PADR_ | ( |  | t | ) | PAD_(t)

Definition at line 44 of file sysproto_posix.h.

## Typedef Documentation

## ◆ register_t

typedef int register_t

Definition at line 38 of file sysproto_posix.h.

## Function Documentation

## ◆ access()

int access | ( | struct thread * | td,
|  | struct access_args * | uap
| ) |  |

Definition at line 130 of file gen_calls.c.

References kprintf(), and access_args::path.

Here is the call graph for this function:

## ◆ fstatfs()

int fstatfs | ( | struct thread * | td,
|  | struct sys_fstatfs_args * | uap
| ) |  |

## ◆ mprotect()

int mprotect | ( | struct thread * | td,
|  | struct mprotect_args * | uap
| ) |  |

Definition at line 136 of file gen_calls.c.

## ◆ setitimer()

int setitimer | ( | struct thread * | td,
|  | struct setitimer_args * | uap
| ) |  |

place holder for now functionality to be added later

Definition at line 124 of file gen_calls.c.

## ◆ sys_access()

int sys_access | ( | struct thread * | td,
|  | struct sys_access_args * |
| ) |  |

Definition at line 366 of file vfs_calls.c.

References thread::td_retval.

## ◆ sys_chdir()

int sys_chdir | ( | struct thread * | td,
|  | struct sys_chdir_args * |
| ) |  |

Definition at line 186 of file file.c.

References _current, osInfo::cwd, taskStruct::oInfo, sys_chdir_args::path, sprintf(), strstr(), and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_close()

int sys_close | ( | struct thread * | td,
|  | struct sys_close_args * |
| ) |  |

Definition at line 99 of file vfs_calls.c.

References file::data, fclose(), file::fd, sys_close_args::fd, file::fd_type, fdestroy(), getfd(), kprintf(), thread::o_files, pipeInfo::rFD, pipeInfo::rfdCNT, thread::td_retval, pipeInfo::wFD, and pipeInfo::wfdCNT.

Here is the call graph for this function:

## ◆ sys_dup2()

int sys_dup2 | ( | struct thread * | ,
|  | struct sys_dup2_args * |
| ) |  |

Definition at line 377 of file descrip.c.

References dup2(), sys_dup2_args::from, thread::td_retval, and sys_dup2_args::to.

Here is the call graph for this function:

## ◆ sys_execve()

int sys_execve | ( | struct thread * | td,
|  | struct sys_execve_args * |
| ) |  |

Definition at line 33 of file execve.c.

References sys_execve_args::argv, sys_execve_args::envp, sys_execve_args::fname, sys_exec(), and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_exit()

int sys_exit | ( | struct thread * | ,
|  | struct sys_exit_args * |
| ) |  |

Definition at line 45 of file gen_calls.c.

References _current, endTask(), and taskStruct::id.

Here is the call graph for this function:

## ◆ sys_fchdir()

int sys_fchdir | ( | struct thread * | td,
|  | struct sys_fchdir_args * |
| ) |  |

Definition at line 197 of file file.c.

References _current, osInfo::cwd, file::fd, sys_fchdir_args::fd, fileDescriptor::fileName, getfd(), taskStruct::oInfo, sprintf(), and strstr().

Here is the call graph for this function:

## ◆ sys_fclose()

int sys_fclose | ( | struct thread * | td,
|  | struct sys_fclose_args * |
| ) |  |

Definition at line 277 of file file.c.

References fclose(), userFileDescriptorStruct::fd, sys_fclose_args::FILE, and NULL.

Here is the call graph for this function:

## ◆ sys_fcntl()

int sys_fcntl | ( | struct thread * | td,
|  | struct sys_fcntl_args * |
| ) |  |

Definition at line 92 of file descrip.c.

References fcntl().

Here is the call graph for this function:

## ◆ sys_fgetc()

int sys_fgetc | ( | struct thread * | td,
|  | struct sys_fgetc_args * |
| ) |  |

Definition at line 76 of file file.c.

References _current, userFileDescriptorStruct::fd, fgetc(), sys_fgetc_args::FILE, getchar(), sched_yield(), thread::td_retval, taskStruct::term, and tty_foreground.

Here is the call graph for this function:

## ◆ sys_fopen()

int sys_fopen | ( | struct thread * | td,
|  | struct sys_fopen_args * |
| ) |  |

Definition at line 237 of file file.c.

References userFileDescriptorStruct::fd, userFileDescriptorStruct::fdSize, sys_fopen_args::FILE, fopen(), kprintf(), sys_fopen_args::mode, NULL, sys_fopen_args::path, and fileDescriptor::size.

Here is the call graph for this function:

## ◆ sys_fork()

int sys_fork | ( | struct thread * | ,
|  | struct sys_fork_args * |
| ) |  |

Definition at line 40 of file fork.c.

References _current, tssStruct::back_link, taskStruct::children, tssStruct::cr3, tssStruct::cs, osInfo::cwd, tssStruct::ds, tssStruct::eax, tssStruct::ebp, tssStruct::ebx, tssStruct::ecx, tssStruct::edi, tssStruct::edx, tssStruct::eflags, tssStruct::eip, tssStruct::es, tssStruct::esi, tssStruct::esp, tssStruct::esp0, tssStruct::esp1, tssStruct::esp2, FORK, thread::frame, tssStruct::fs, taskStruct::gid, tssStruct::gs, taskStruct::id, tssStruct::io_map, kmalloc(), tssStruct::ldt, memcpy(), thread::o_files, taskStruct::oInfo, tty_termNode::owner, taskStruct::parent, taskStruct::pgrp, taskStruct::ppid, sched_yield(), schedNewTask(), tssStruct::ss, tssStruct::ss0, tssStruct::ss1, tssStruct::ss2, taskStruct::state, taskStruct::td, thread::td_retval, taskStruct::term, trapframe::tf_cs, trapframe::tf_ds, trapframe::tf_ebp, trapframe::tf_ebx, trapframe::tf_ecx, trapframe::tf_edi, trapframe::tf_edx, trapframe::tf_eflags, trapframe::tf_eip, trapframe::tf_es, trapframe::tf_esi, trapframe::tf_esp, trapframe::tf_fs, trapframe::tf_ss, tssStruct::trace_bitmap, taskStruct::tss, taskStruct::uid, thread::vm_daddr, thread::vm_dsize, thread::vm_taddr, thread::vm_tsize, vmm_copyVirtualSpace(), and osInfo::vmStart.

Here is the call graph for this function:

## ◆ sys_fread()

int sys_fread | ( | struct thread * | td,
|  | struct sys_fread_args * |
| ) |  |

Definition at line 258 of file file.c.

References userFileDescriptorStruct::fd, sys_fread_args::FILE, fread(), sys_fread_args::nmemb, NULL, sys_fread_args::ptr, sys_fread_args::size, and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_fseek()

int sys_fseek | ( | struct thread * | td,
|  | struct sys_fseek_args * |
| ) |  |

Definition at line 119 of file file.c.

References userFileDescriptorStruct::fd, sys_fseek_args::FILE, kprintf(), NULL, fileDescriptor::offset, sys_fseek_args::offset, thread::td_retval, and sys_fseek_args::whence.

Here is the call graph for this function:

## ◆ sys_fstat()

int sys_fstat | ( | struct thread * | td,
|  | struct sys_fstat_args * |
| ) |  |

Definition at line 91 of file stat.c.

References ufs2_dinode::di_atime, ufs2_dinode::di_ctime, ufs2_dinode::di_gid, ufs2_dinode::di_mode, ufs2_dinode::di_mtime, ufs2_dinode::di_nlink, ufs2_dinode::di_size, ufs2_dinode::di_uid, file::fd, sys_fstat_args::fd, getfd(), fileDescriptor::ino, fileDescriptor::inode, fileDescriptor::res, sys_fstat_args::sb, fileDescriptor::size, stat::st_atime, stat::st_ctime, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, thread::td_retval, inode::u, and inode::ufs2_i.

Here is the call graph for this function:

## ◆ sys_fstatat()

int sys_fstatat | ( | struct thread * | td,
|  | struct sys_fstatat_args * |
| ) |  |

Definition at line 133 of file stat.c.

References sys_fstatat_args::buf, ufs2_dinode::di_atime, ufs2_dinode::di_ctime, ufs2_dinode::di_gid, ufs2_dinode::di_mode, ufs2_dinode::di_mtime, ufs2_dinode::di_nlink, ufs2_dinode::di_size, ufs2_dinode::di_uid, fclose(), file::fd, sys_fstatat_args::fd, fopen(), getfd(), fileDescriptor::ino, fileDescriptor::inode, sys_fstatat_args::path, stat::st_atime, stat::st_ctime, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, strlen(), thread::td_retval, inode::u, and inode::ufs2_i.

Here is the call graph for this function:

## ◆ sys_fstatfs()

int sys_fstatfs | ( | struct thread * | td,
|  | struct sys_fstatfs_args * |
| ) |  |

Definition at line 182 of file stat.c.

References sys_fstatfs_args::buf, statfs::f_asyncreads, statfs::f_asyncwrites, statfs::f_bavail, statfs::f_bfree, statfs::f_blocks, statfs::f_bsize, statfs::f_ffree, statfs::f_files, statfs::f_flags, statfs::f_fsid, statfs::f_fstypename, statfs::f_iosize, statfs::f_mntfromname, statfs::f_mntonname, statfs::f_namemax, statfs::f_owner, statfs::f_syncreads, statfs::f_syncwrites, statfs::f_type, statfs::f_version, file::fd, sys_fstatfs_args::fd, getfd(), sprintf(), thread::td_retval, and fsid::val.

Here is the call graph for this function:

## ◆ sys_getcwd()

int sys_getcwd | ( | struct thread * | td,
|  | struct sys_getcwd_args * |
| ) |  |

Definition at line 204 of file syscall.c.

References _current, sys_getcwd_args::buf, osInfo::cwd, taskStruct::oInfo, sprintf(), and strlen().

Here is the call graph for this function:

## ◆ sys_getdirentries()

int sys_getdirentries | ( | struct thread * | td,
|  | struct sys_getdirentries_args * |
| ) |  |

Definition at line 373 of file vfs_calls.c.

References sys_getdirentries_args::buf, sys_getdirentries_args::count, DEV_BSIZE, file::fd, sys_getdirentries_args::fd, fread(), getfd(), and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_getegid()

int sys_getegid | ( | struct thread * | td,
|  | struct sys_getegid_args * |
| ) |  |

Definition at line 233 of file gen_calls.c.

References _current, taskStruct::gid, and thread::td_retval.

## ◆ sys_geteuid()

int sys_geteuid | ( | struct thread * | td,
|  | struct sys_geteuid_args * |
| ) |  |

Definition at line 228 of file gen_calls.c.

References _current, thread::td_retval, and taskStruct::uid.

## ◆ sys_getGID()

int sys_getGID | ( | struct thread * | td,
|  | void * |
| ) |  |

Definition at line 59 of file access.c.

## ◆ sys_getlogin()

int sys_getlogin | ( | struct thread * | ,
|  | struct sys_getlogin_args * |
| ) |  |

Definition at line 360 of file gen_calls.c.

References _current, memcpy(), sys_getlogin_args::namebuf, sys_getlogin_args::namelen, and taskStruct::username.

Here is the call graph for this function:

## ◆ sys_getpgrp()

int sys_getpgrp | ( | struct thread * | td,
|  | struct sys_getpgrp_args * |
| ) |  |

Definition at line 310 of file gen_calls.c.

References _current, taskStruct::pgrp, and thread::td_retval.

## ◆ sys_getpid()

int sys_getpid | ( | struct thread * | td,
|  | struct sys_getpid_args * |
| ) |  |

Definition at line 224 of file gen_calls.c.

References _current, taskStruct::id, and thread::td_retval.

## ◆ sys_getppid()

int sys_getppid | ( | struct thread * | td,
|  | struct sys_getppid_args * |
| ) |  |

Definition at line 238 of file gen_calls.c.

References _current, taskStruct::ppid, and thread::td_retval.

## ◆ sys_getrlimit()

int sys_getrlimit | ( | struct thread * | ,
|  | struct sys_getrlimit_args * |
| ) |  |

Definition at line 376 of file gen_calls.c.

References kprintf(), thread::rlim, rlimit::rlim_cur, rlimit::rlim_max, sys_getrlimit_args::rlp, and sys_getrlimit_args::which.

Here is the call graph for this function:

## ◆ sys_gettimeofday()

int sys_gettimeofday | ( | struct thread * | td,
|  | struct sys_gettimeofday_args * |
| ) |  |

Definition at line 354 of file gen_calls.c.

References gettimeofday(), thread::td_retval, sys_gettimeofday_args::tp, and sys_gettimeofday_args::tzp.

Here is the call graph for this function:

## ◆ sys_getUID()

int sys_getUID | ( | struct thread * | td,
|  | void * |
| ) |  |

Definition at line 51 of file access.c.

## ◆ sys_invalid()

int sys_invalid | ( | struct thread * | ,
|  | void * |
| ) |  |

Definition at line 141 of file gen_calls.c.

References _current, thread::frame, taskStruct::id, kprintf(), thread::td_retval, and trapframe::tf_eax.

Here is the call graph for this function:

## ◆ sys_ioctl()

int sys_ioctl | ( | struct thread * | td,
|  | struct sys_ioctl_args * |
| ) |  |

Definition at line 229 of file descrip.c.

References termios::c_cc, termios::c_cflag, termios::c_iflag, termios::c_ispeed, termios::c_lflag, termios::c_oflag, termios::c_ospeed, sys_ioctl_args::com, sys_ioctl_args::data, sys_ioctl_args::fd, kprintf(), thread::td_retval, TIOCGETA, TIOCGWINSZ, winsize::ws_col, and winsize::ws_row.

Here is the call graph for this function:

## ◆ sys_issetugid()

int sys_issetugid | ( | struct thread * | td,
|  | struct sys_issetugid_args * |
| ) |  |

## ◆ sys_lseek()

int sys_lseek | ( | struct thread * | td,
|  | struct sys_lseek_args * |
| ) |  |

Definition at line 149 of file file.c.

References file::fd, sys_lseek_args::fd, getfd(), kprintf(), fileDescriptor::offset, sys_lseek_args::offset, SEEK_CUR, SEEK_SET, thread::td_retval, and sys_lseek_args::whence.

Here is the call graph for this function:

## ◆ sys_lstat()

int sys_lstat | ( | struct thread * | td,
|  | struct sys_lstat_args * |
| ) |  |

Definition at line 297 of file stat.c.

References _sys_stat(), sys_lstat_args::path, sys_lstat_args::sb, STAT_LSTAT, and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_mmap()

int sys_mmap | ( | struct thread * | td,
|  | struct sys_mmap_args * |
| ) |  |

Definition at line 162 of file vmm_mmap.c.

References _current, sys_mmap_args::addr, bzero, file::fd, sys_mmap_args::fd, fread(), fseek(), getfd(), taskStruct::id, K_PANIC, kpanic(), sys_mmap_args::len, PAGE_DEFAULT, sys_mmap_args::pos, round_page, thread::td_retval, VM_TASK, vmm_findFreePage(), VMM_FREE, vmm_getFreeVirtualPage(), vmm_remapPage(), and vmm_unmapPage().

Here is the call graph for this function:

## ◆ sys_munmap()

int sys_munmap | ( | struct thread * | td,
|  | struct sys_munmap_args * |
| ) |  |

Definition at line 155 of file vmm_mmap.c.

References thread::td_retval.

## ◆ sys_open()

int sys_open | ( | struct thread * | td,
|  | struct sys_open_args * |
| ) |  |

Definition at line 39 of file vfs_calls.c.

References AT_FDCWD, sys_open_args::flags, kern_openat(), kprintf(), sys_open_args::mode, and sys_open_args::path.

Here is the call graph for this function:

## ◆ sys_openat()

int sys_openat | ( | struct thread * | td,
|  | struct sys_openat_args * |
| ) |  |

Definition at line 45 of file vfs_calls.c.

References falloc(), file::fd, fdestroy(), sys_openat_args::flag, fopen(), kprintf(), O_RDWR, O_WRONLY, sys_openat_args::path, and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_pipe2()

int sys_pipe2 | ( | struct thread * | ,
|  | struct sys_pipe2_args * |
| ) |  |

Definition at line 36 of file kern_pipe.c.

References file::data, falloc(), file::fd_type, sys_pipe2_args::fildes, kmalloc(), memset(), pipeInfo::rFD, pipeInfo::rfdCNT, thread::td_retval, pipeInfo::wFD, and pipeInfo::wfdCNT.

Here is the call graph for this function:

## ◆ sys_pread()

int sys_pread | ( | struct thread * | td,
|  | struct sys_pread_args * |
| ) |  |

Definition at line 239 of file vfs_calls.c.

References _current, sys_pread_args::buf, file::fd, sys_pread_args::fd, fread(), getchar(), getfd(), kprintf(), sys_pread_args::nbyte, fileDescriptor::offset, sys_pread_args::offset, sched_yield(), thread::td_retval, taskStruct::term, and tty_foreground.

Here is the call graph for this function:

## ◆ sys_read()

int sys_read | ( | struct thread * | ,
|  | struct sys_read_args * |
| ) |  |

Definition at line 151 of file vfs_calls.c.

References _current, pipeInfo::bCNT, sys_read_args::buf, pipeBuf::buffer, file::data, sys_read_args::fd, file::fd, file::fd_type, fread(), getchar(), getfd(), pipeInfo::headPB, kfree(), kprintf(), memcpy(), sys_read_args::nbyte, pipeBuf::nbytes, pipeBuf::next, pipeBuf::offset, sched_yield(), thread::td_retval, taskStruct::term, and tty_foreground.

Here is the call graph for this function:

## ◆ sys_readlink()

int sys_readlink | ( | struct thread * | ,
|  | struct sys_readlink_args * |
| ) |  |

Definition at line 389 of file vfs_calls.c.

References sys_readlink_args::count, kprintf(), sys_readlink_args::path, and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_rename()

int sys_rename | ( | struct thread * | td,
|  | struct sys_rename_args * |
| ) |  |

Definition at line 220 of file file.c.

References thread::td_retval.

## ◆ sys_sched_yield()

int sys_sched_yield | ( | struct thread * | td,
|  | void * |
| ) |  |

Definition at line 224 of file syscall.c.

References sched_yield().

Here is the call graph for this function:

## ◆ sys_select()

int sys_select | ( | struct thread * | td,
|  | struct sys_select_args * |
| ) |  |

Definition at line 285 of file descrip.c.

References sys_select_args::ex, sys_select_args::in, sys_select_args::nd, sys_select_args::ou, thread::td_retval, and sys_select_args::tv.

## ◆ sys_sendto()

int sys_sendto | ( | struct thread * | td,
|  | struct sys_sendto_args * |
| ) |  |

Definition at line 540 of file sys_arch.c.

References sys_sendto_args::buf, file::fd, sys_sendto_args::flags, getfd(), sys_sendto_args::len, sys_sendto_args::s, thread::td_retval, sys_sendto_args::to, and sys_sendto_args::tolen.

Here is the call graph for this function:

## ◆ sys_setGID()

int sys_setGID | ( | struct thread * | td,
|  | struct sys_setGID_args * |
| ) |  |

Definition at line 63 of file access.c.

## ◆ sys_setlogin()

int sys_setlogin | ( | struct thread * | ,
|  | struct sys_setlogin_args * |
| ) |  |

Definition at line 368 of file gen_calls.c.

References _current, memcpy(), sys_setlogin_args::namebuf, and taskStruct::username.

Here is the call graph for this function:

## ◆ sys_setpgid()

int sys_setpgid | ( | struct thread * | td,
|  | struct sys_setpgid_args * |
| ) |  |

Definition at line 315 of file gen_calls.c.

References _current, taskStruct::id, sys_setpgid_args::pgid, taskStruct::pgrp, sys_setpgid_args::pid, schedFindTask(), and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_setpgrp()

int sys_setpgrp | ( | struct thread * | td,
|  | struct sys_setpgid_args * |
| ) |  |

## ◆ sys_setrlimit()

int sys_setrlimit | ( | struct thread * | ,
|  | struct sys_setrlimit_args * |
| ) |  |

Definition at line 450 of file gen_calls.c.

References kprintf(), thread::rlim, rlimit::rlim_cur, rlimit::rlim_max, sys_setrlimit_args::rlp, and sys_setrlimit_args::which.

Here is the call graph for this function:

## ◆ sys_setsockopt()

int sys_setsockopt | ( | struct thread * | td,
|  | struct sys_setsockopt_args * |
| ) |  |

Definition at line 529 of file sys_arch.c.

References file::fd, getfd(), kprintf(), sys_setsockopt_args::level, sys_setsockopt_args::name, sys_setsockopt_args::s, thread::td_retval, sys_setsockopt_args::val, and sys_setsockopt_args::valsize.

Here is the call graph for this function:

## ◆ sys_setUID()

int sys_setUID | ( | struct thread * | td,
|  | struct sys_setUID_args * |
| ) |  |

Definition at line 43 of file access.c.

## ◆ sys_sigaction()

int sys_sigaction | ( | struct thread * | td,
|  | struct sys_sigaction_args * |
| ) |  |

Definition at line 294 of file gen_calls.c.

References sys_sigaction_args::act, memcpy(), sys_sigaction_args::oact, sys_sigaction_args::sig, thread::sigact, and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_sigprocmask()

int sys_sigprocmask | ( | struct thread * | td,
|  | struct sys_sigprocmask_args * |
| ) |  |

Definition at line 243 of file gen_calls.c.

References __sigset::__bits, sys_sigprocmask_args::how, kprintf(), memcpy(), sys_sigprocmask_args::oset, sys_sigprocmask_args::set, SIG_BLOCK, SIG_SETMASK, SIG_UNBLOCK, thread::sigmask, and thread::td_retval.

Here is the call graph for this function:

## ◆ sys_socket()

int sys_socket | ( | struct thread * | td,
|  | struct sys_socket_args * |
| ) |  |

Definition at line 502 of file sys_arch.c.

References sys_socket_args::domain, falloc(), file::fd, file::fd_type, fdestroy(), kprintf(), sys_socket_args::protocol, file::socket, thread::td_retval, and sys_socket_args::type.

Here is the call graph for this function:

## ◆ sys_stat()

int sys_stat | ( | struct thread * | td,
|  | struct sys_stat_args * |
| ) |  |

Definition at line 302 of file stat.c.

References _sys_stat(), sys_stat_args::path, STAT_LSTAT, thread::td_retval, and sys_stat_args::ub.

Here is the call graph for this function:

## ◆ sys_statfs()

int sys_statfs | ( | struct thread * | td,
|  | struct sys_statfs_args * | args
| ) |  |

Definition at line 239 of file stat.c.

References sys_statfs_args::buf, statfs::f_asyncreads, statfs::f_asyncwrites, statfs::f_bavail, statfs::f_bfree, statfs::f_blocks, statfs::f_bsize, statfs::f_ffree, statfs::f_files, statfs::f_flags, statfs::f_fsid, statfs::f_fstypename, statfs::f_iosize, statfs::f_mntfromname, statfs::f_mntonname, statfs::f_namemax, statfs::f_owner, statfs::f_syncreads, statfs::f_syncwrites, statfs::f_type, statfs::f_version, file::fd, fopen(), sys_statfs_args::path, sprintf(), thread::td_retval, and fsid::val.

Here is the call graph for this function:

## ◆ sys_sysarch()

int sys_sysarch | ( | struct thread * | td,
|  | struct sys_sysarch_args * |
| ) |  |

Definition at line 186 of file gen_calls.c.

References gdtDescriptor::access, gdtDescriptor::baseHigh, gdtDescriptor::baseLow, gdtDescriptor::baseMed, dBig, dBiglim, dData, dDpl3, dPresent, dWrite, gdtDescriptor::granularity, kprintf(), gdtDescriptor::limitHigh, gdtDescriptor::limitLow, sys_sysarch_args::op, sys_sysarch_args::parms, thread::td_retval, and VMM_USER_LDT.

Here is the call graph for this function:

## ◆ sys_sysctl()

int sys_sysctl | ( | struct thread * | td,
|  | struct sys_sysctl_args * |
| ) |  |

Definition at line 286 of file kern_sysctl.c.

## ◆ sys_wait4()

int sys_wait4 | ( | struct thread * | td,
|  | struct sys_wait4_args * |
| ) |  |

Definition at line 147 of file gen_calls.c.

References _current, taskStruct::children, ECHILD, taskStruct::id, taskStruct::last_exit, sys_wait4_args::pid, sched_setStatus(), sched_yield(), schedFindTask(), thread::td_retval, and WAIT.

Here is the call graph for this function:

## ◆ sys_write()

int sys_write | ( | struct thread * | td,
|  | struct sys_write_args * |
| ) |  |

Definition at line 293 of file vfs_calls.c.

References pipeInfo::bCNT, sys_write_args::buf, pipeBuf::buffer, buffer, file::data, defaultColor, file::fd, sys_write_args::fd, file::fd_type, fwrite(), getfd(), pipeInfo::headPB, kfree(), kmalloc(), kprintf(), memcpy(), sys_write_args::nbyte, pipeBuf::nbytes, pipeBuf::next, thread::o_files, printColor, fileDescriptor::res, pipeInfo::tailPB, and thread::td_retval.

Here is the call graph for this function: