root/fs/file_table.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. get_empty_filp

   1 /*
   2  *  linux/fs/file_table.c
   3  *
   4  *  Copyright (C) 1991, 1992  Linus Torvalds
   5  */
   6 
   7 #include <linux/fs.h>
   8 #include <linux/string.h>
   9 
  10 struct file file_table[NR_FILE];
  11 
  12 struct file * get_empty_filp(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  13 {
  14         int i;
  15         struct file * f = file_table+0;
  16 
  17         for (i = 0; i++ < NR_FILE; f++)
  18                 if (!f->f_count) {
  19                         memset(f,0,sizeof(*f));
  20                         f->f_count = 1;
  21                         return f;
  22                 }
  23         return NULL;
  24 }

/* [previous][next][first][last][top][bottom][index][help] */