UbixOS
2.0
|
Go to the source code of this file.
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 |
#define PAD_ | ( | t | ) | (sizeof(register_t) <= sizeof(t) ? 0 : sizeof(register_t) - sizeof(t)) |
Definition at line 40 of file sysproto_posix.h.
#define PADL_ | ( | t | ) | 0 |
Definition at line 43 of file sysproto_posix.h.
#define PADR_ | ( | t | ) | PAD_(t) |
Definition at line 44 of file sysproto_posix.h.
typedef int register_t |
Definition at line 38 of file sysproto_posix.h.
int access | ( | struct thread * | td, |
struct access_args * | uap | ||
) |
Definition at line 130 of file gen_calls.c.
References kprintf(), and access_args::path.
int fstatfs | ( | struct thread * | td, |
struct sys_fstatfs_args * | uap | ||
) |
int mprotect | ( | struct thread * | td, |
struct mprotect_args * | uap | ||
) |
Definition at line 136 of file gen_calls.c.
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.
int sys_access | ( | struct thread * | td, |
struct sys_access_args * | |||
) |
Definition at line 364 of file vfs_calls.c.
References thread::td_retval.
int sys_chdir | ( | struct thread * | td, |
struct sys_chdir_args * | |||
) |
Definition at line 192 of file file.c.
References _current, osInfo::cwd, taskStruct::oInfo, sys_chdir_args::path, sprintf(), strstr(), and thread::td_retval.
int sys_close | ( | struct thread * | td, |
struct sys_close_args * | |||
) |
Definition at line 94 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.
int sys_dup2 | ( | struct thread * | , |
struct sys_dup2_args * | |||
) |
Definition at line 375 of file descrip.c.
References dup2(), sys_dup2_args::from, thread::td_retval, and sys_dup2_args::to.
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.
int sys_exit | ( | struct thread * | , |
struct sys_exit_args * | |||
) |
Definition at line 45 of file gen_calls.c.
References _current, endTask(), and taskStruct::id.
int sys_fchdir | ( | struct thread * | td, |
struct sys_fchdir_args * | |||
) |
Definition at line 203 of file file.c.
References _current, osInfo::cwd, file::fd, sys_fchdir_args::fd, fileDescriptor::fileName, getfd(), taskStruct::oInfo, sprintf(), and strstr().
int sys_fclose | ( | struct thread * | td, |
struct sys_fclose_args * | |||
) |
Definition at line 283 of file file.c.
References fclose(), userFileDescriptorStruct::fd, sys_fclose_args::FILE, and NULL.
int sys_fcntl | ( | struct thread * | td, |
struct sys_fcntl_args * | |||
) |
int sys_fgetc | ( | struct thread * | td, |
struct sys_fgetc_args * | |||
) |
Definition at line 81 of file file.c.
References _current, userFileDescriptorStruct::fd, fgetc(), sys_fgetc_args::FILE, getchar(), sched_yield(), thread::td_retval, taskStruct::term, and tty_foreground.
int sys_fopen | ( | struct thread * | td, |
struct sys_fopen_args * | |||
) |
Definition at line 243 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.
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.
int sys_fread | ( | struct thread * | td, |
struct sys_fread_args * | |||
) |
Definition at line 264 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.
int sys_fseek | ( | struct thread * | td, |
struct sys_fseek_args * | |||
) |
Definition at line 124 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.
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.
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.
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.
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().
int sys_getdirentries | ( | struct thread * | td, |
struct sys_getdirentries_args * | |||
) |
Definition at line 371 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
int sys_ioctl | ( | struct thread * | td, |
struct sys_ioctl_args * | |||
) |
Definition at line 228 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.
int sys_issetugid | ( | struct thread * | td, |
struct sys_issetugid_args * | |||
) |
int sys_lseek | ( | struct thread * | td, |
struct sys_lseek_args * | |||
) |
Definition at line 154 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.
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.
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().
int sys_munmap | ( | struct thread * | td, |
struct sys_munmap_args * | |||
) |
Definition at line 155 of file vmm_mmap.c.
References thread::td_retval.
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.
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.
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.
int sys_pread | ( | struct thread * | td, |
struct sys_pread_args * | |||
) |
Definition at line 237 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.
int sys_read | ( | struct thread * | , |
struct sys_read_args * | |||
) |
Definition at line 148 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.
int sys_readlink | ( | struct thread * | , |
struct sys_readlink_args * | |||
) |
Definition at line 387 of file vfs_calls.c.
References sys_readlink_args::count, kprintf(), sys_readlink_args::path, and thread::td_retval.
int sys_rename | ( | struct thread * | td, |
struct sys_rename_args * | |||
) |
Definition at line 226 of file file.c.
References thread::td_retval.
int sys_sched_yield | ( | struct thread * | td, |
void * | |||
) |
Definition at line 224 of file syscall.c.
References sched_yield().
int sys_select | ( | struct thread * | td, |
struct sys_select_args * | |||
) |
Definition at line 284 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.
int sys_sendto | ( | struct thread * | td, |
struct sys_sendto_args * | |||
) |
Definition at line 539 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.
int sys_setGID | ( | struct thread * | td, |
struct sys_setGID_args * | |||
) |
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.
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.
int sys_setpgrp | ( | struct thread * | td, |
struct sys_setpgid_args * | |||
) |
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.
int sys_setsockopt | ( | struct thread * | td, |
struct sys_setsockopt_args * | |||
) |
Definition at line 528 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.
int sys_setUID | ( | struct thread * | td, |
struct sys_setUID_args * | |||
) |
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.
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.
int sys_socket | ( | struct thread * | td, |
struct sys_socket_args * | |||
) |
Definition at line 500 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.
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.
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.
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.
int sys_sysctl | ( | struct thread * | td, |
struct sys_sysctl_args * | |||
) |
Definition at line 286 of file kern_sysctl.c.
int sys_unlink | ( | struct thread * | , |
struct sys_unlink_args * | |||
) |
Definition at line 449 of file vfs_calls.c.
References fl_remove(), kprintf(), sys_unlink_args::path, and thread::td_retval.
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.
int sys_write | ( | struct thread * | td, |
struct sys_write_args * | |||
) |
Definition at line 291 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.