| UbixOS
    2.0
    | 
#include <sys/thread.h>#include <sys/sysproto_posix.h>#include <vfs/file.h>#include <vfs/stat.h>#include <sys/fcntl.h>

Go to the source code of this file.
| Data Structures | |
| struct | file | 
| struct | fileOps | 
| struct | ucred | 
| struct | uio | 
| Macros | |
| #define | MAX_FILES 256 | 
| Typedefs | |
| typedef int | fo_close_t(struct file *fp, struct thread *td) | 
| typedef int | fo_rdwr_t(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) | 
| typedef int | fo_stat_t(struct file *fp, struct stat *sb, struct ucred *active_cred, struct thread *td) | 
| typedef __mode_t | mode_t | 
| typedef __nlink_t | nlink_t | 
| Functions | |
| int | close (struct thread *, struct close_args *) | 
| int | falloc (struct thread *, struct file **, int *) | 
| int | fcntl (struct thread *, struct sys_fcntl_args *) | 
| int | fstat (struct thread *, struct sys_fstat_args *) | 
| int | getdtablesize (struct thread *, struct getdtablesize_args *) | 
| 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_kern_openat (struct thread *, int, char *, int) | |
| int | ioctl (struct thread *, struct ioctl_args *) | 
| ioctl functionality not implimented yet  More... | |
| int close | ( | struct thread * | , | 
| struct close_args * | |||
| ) | 
Definition at line 161 of file descrip.c.
References close_args::fd, kfree(), kprintf(), thread::o_files, and thread::td_retval.

Definition at line 97 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 * | , | 
| struct sys_fcntl_args * | |||
| ) | 
Definition at line 41 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().

| int fstat | ( | struct thread * | , | 
| struct sys_fstat_args * | |||
| ) | 
Definition at line 184 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 * | , | 
| struct getdtablesize_args * | |||
| ) | 
return data table size
Definition at line 175 of file descrip.c.
References kprintf(), O_FILES, and thread::td_retval.

get pointer to file fd in specified thread
Definition at line 213 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_kern_openat | ( | struct thread * | , | 
| int | , | ||
| char * | , | ||
| int | |||
| ) | 
| int ioctl | ( | struct thread * | td, | 
| struct ioctl_args * | uap | ||
| ) | 
ioctl functionality not implimented yet
Definition at line 203 of file descrip.c.
References thread::td_retval.