|
UbixOS V2
2.0
|
#include <sys/descrip.h>#include <sys/sysproto_posix.h>#include <sys/thread.h>#include <lib/kprintf.h>#include <ubixos/endtask.h>#include <lib/kmalloc.h>#include <assert.h>#include <sys/select.h>#include <sys/ioctl.h>
Go to the source code of this file.
Functions | |
| int | close (struct thread *td, struct close_args *uap) |
| int | dup2 (struct thread *td, u_int32_t from, u_int32_t to) |
| int | falloc (struct thread *td, struct file **resultfp, int *resultfd) |
| int | fcntl (struct thread *td, struct sys_fcntl_args *uap) |
| int | fdestroy (struct thread *td, struct file *fp, int fd) |
| The function bar. More... | |
| int | fstat (struct thread *td, struct sys_fstat_args *uap) |
| int | getdtablesize (struct thread *td, struct getdtablesize_args *uap) |
| return data table size More... | |
| int | getfd (struct thread *td, struct file **fp, int fd) |
| get pointer to file fd in specified thread More... | |
| int | ioctl (struct thread *td, struct ioctl_args *uap) |
| ioctl functionality not implimented yet More... | |
| int | sys_dup2 (struct thread *td, struct sys_dup2_args *args) |
| int | sys_fcntl (struct thread *td, struct sys_fcntl_args *uap) |
| int | sys_ioctl (struct thread *td, struct sys_ioctl_args *args) |
| int | sys_select (struct thread *td, struct sys_select_args *args) |
| int close | ( | struct thread * | td, |
| struct close_args * | uap | ||
| ) |
Definition at line 162 of file descrip.c.
References close_args::fd, kfree(), kprintf(), thread::o_files, and thread::td_retval.

Definition at line 348 of file descrip.c.
References fileDescriptor::dup, fclose(), file::fd, fdestroy(), kmalloc(), kprintf(), MAX_FILES, memcpy(), and thread::o_files.
Referenced by sys_dup2().

Definition at line 96 of file descrip.c.
References kfree(), kmalloc(), MAX_FILES, and thread::o_files.
Referenced by kern_openat(), pipe(), sys_openat(), sys_pipe2(), and sys_socket().

| int fcntl | ( | struct thread * | td, |
| struct sys_fcntl_args * | uap | ||
| ) |
Definition at line 40 of file descrip.c.
References sys_fcntl_args::arg, sys_fcntl_args::cmd, file::f_flag, fclose(), FCNTLFLAGS, sys_fcntl_args::fd, fdestroy(), FFLAGS, kmalloc(), kprintf(), MAX_FILES, memcpy(), O_ACCMODE, thread::o_files, and thread::td_retval.
Referenced by sys_fcntl().

The function bar.
This function does something which is doing nothing. So this text is totally senseless and you really do not need to read this, because this text is basically saying nothing.
| [in] | a | Description of parameter a. |
| [out] | b | Description of the parameter b. |
| [in,out] | c | Description of the parameter c. |
| ERR_SUCCESS | The function is successfully executed |
| ERR_FAILURE | An error occurred |
Definition at line 147 of file descrip.c.
References file::fd, kfree(), kprintf(), and thread::o_files.
Referenced by dup2(), fcntl(), kern_openat(), sys_close(), sys_openat(), and sys_socket().

| int fstat | ( | struct thread * | td, |
| struct sys_fstat_args * | uap | ||
| ) |
Definition at line 185 of file descrip.c.
References _current, sys_fstat_args::fd, kprintf(), thread::o_files, sys_fstat_args::sb, stat::st_blksize, stat::st_mode, and taskStruct::td.

| int getdtablesize | ( | struct thread * | td, |
| struct getdtablesize_args * | uap | ||
| ) |
return data table size
Definition at line 176 of file descrip.c.
References kprintf(), O_FILES, and thread::td_retval.

get pointer to file fd in specified thread
Definition at line 214 of file descrip.c.
References file::fd, kprintf(), and thread::o_files.
Referenced by read(), sys_close(), sys_fchdir(), sys_fstat(), sys_fstatat(), sys_fstatfs(), sys_getdirentries(), sys_lseek(), sys_mmap(), sys_pread(), sys_read(), sys_sendto(), sys_setsockopt(), and sys_write().

| int ioctl | ( | struct thread * | td, |
| struct ioctl_args * | uap | ||
| ) |
ioctl functionality not implimented yet
Definition at line 204 of file descrip.c.
References thread::td_retval.
| int sys_dup2 | ( | struct thread * | td, |
| struct sys_dup2_args * | args | ||
| ) |
Definition at line 377 of file descrip.c.
References dup2(), sys_dup2_args::from, thread::td_retval, and sys_dup2_args::to.

| int sys_fcntl | ( | struct thread * | td, |
| struct sys_fcntl_args * | uap | ||
| ) |
| int sys_ioctl | ( | struct thread * | td, |
| struct sys_ioctl_args * | 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.

| int sys_select | ( | struct thread * | td, |
| struct sys_select_args * | 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.