Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
fdtable.h File Reference
#include <linux/posix_types.h>
#include <linux/compiler.h>
#include <linux/spinlock.h>
#include <linux/rcupdate.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/atomic.h>

Go to the source code of this file.

Data Structures

struct  fdtable
 
struct  files_struct
 

Macros

#define NR_OPEN_DEFAULT   BITS_PER_LONG
 
#define rcu_dereference_check_fdtable(files, fdtfd)
 
#define files_fdtable(files)   (rcu_dereference_check_fdtable((files), (files)->fdt))
 
#define fcheck(fd)   fcheck_files(current->files, fd)
 

Functions

void __init files_defer_init (void)
 
struct files_structget_files_struct (struct task_struct *)
 
void put_files_struct (struct files_struct *fs)
 
void reset_files_struct (struct files_struct *)
 
void daemonize_descriptors (void)
 
int unshare_files (struct files_struct **)
 
struct files_structdup_fd (struct files_struct *, int *)
 
void do_close_on_exec (struct files_struct *)
 
int iterate_fd (struct files_struct *, unsigned, int(*)(const void *, struct file *, unsigned), const void *)
 
int __alloc_fd (struct files_struct *files, unsigned start, unsigned end, unsigned flags)
 
void __fd_install (struct files_struct *files, unsigned int fd, struct file *file)
 
int __close_fd (struct files_struct *files, unsigned int fd)
 

Variables

struct kmem_cachefiles_cachep
 

Macro Definition Documentation

#define fcheck (   fd)    fcheck_files(current->files, fd)

Definition at line 91 of file fdtable.h.

#define files_fdtable (   files)    (rcu_dereference_check_fdtable((files), (files)->fdt))

Definition at line 69 of file fdtable.h.

#define NR_OPEN_DEFAULT   BITS_PER_LONG

Definition at line 22 of file fdtable.h.

#define rcu_dereference_check_fdtable (   files,
  fdtfd 
)
Value:
lockdep_is_held(&(files)->file_lock) || \
atomic_read(&(files)->count) == 1 || \
rcu_my_thread_group_empty()))

Definition at line 63 of file fdtable.h.

Function Documentation

int __alloc_fd ( struct files_struct files,
unsigned  start,
unsigned  end,
unsigned  flags 
)

Definition at line 531 of file file.c.

int __close_fd ( struct files_struct files,
unsigned int  fd 
)
void __fd_install ( struct files_struct files,
unsigned int  fd,
struct file file 
)

Definition at line 638 of file file.c.

void daemonize_descriptors ( void  )

Definition at line 522 of file file.c.

void do_close_on_exec ( struct files_struct )

Definition at line 682 of file file.c.

struct files_struct* dup_fd ( struct files_struct ,
int  
)
read

Definition at line 298 of file file.c.

void __init files_defer_init ( void  )

Definition at line 501 of file file.c.

struct files_struct* get_files_struct ( struct task_struct )
read

Definition at line 439 of file file.c.

int iterate_fd ( struct files_struct ,
unsigned  ,
int(*)(const void *, struct file *, unsigned)  ,
const void  
)

Definition at line 992 of file file.c.

void put_files_struct ( struct files_struct fs)

Definition at line 452 of file file.c.

void reset_files_struct ( struct files_struct )

Definition at line 469 of file file.c.

int unshare_files ( struct files_struct **  )

Definition at line 1850 of file fork.c.

Variable Documentation

struct kmem_cache* files_cachep

Definition at line 189 of file fork.c.