OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [file.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef __LINUX_FILE_H
2
#define __LINUX_FILE_H
3
 
4
extern inline struct file * fget(unsigned long fd)
5
{
6
        struct file * file = NULL;
7
        if (fd < NR_OPEN) {
8
                file = current->files->fd[fd];
9
                if (file)
10
                        file->f_count++;
11
        }
12
        return file;
13
}
14
 
15
extern void __fput(struct file *, struct inode *);
16
 
17
extern inline void fput(struct file *file, struct inode *inode)
18
{
19
        int count = file->f_count-1;
20
        if (!count)
21
                __fput(file, inode);
22
        file->f_count = count;
23
}
24
 
25
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.