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] - Diff between revs 1633 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 1633 Rev 1765
#ifndef __LINUX_FILE_H
#ifndef __LINUX_FILE_H
#define __LINUX_FILE_H
#define __LINUX_FILE_H
 
 
extern inline struct file * fget(unsigned long fd)
extern inline struct file * fget(unsigned long fd)
{
{
        struct file * file = NULL;
        struct file * file = NULL;
        if (fd < NR_OPEN) {
        if (fd < NR_OPEN) {
                file = current->files->fd[fd];
                file = current->files->fd[fd];
                if (file)
                if (file)
                        file->f_count++;
                        file->f_count++;
        }
        }
        return file;
        return file;
}
}
 
 
extern void __fput(struct file *, struct inode *);
extern void __fput(struct file *, struct inode *);
 
 
extern inline void fput(struct file *file, struct inode *inode)
extern inline void fput(struct file *file, struct inode *inode)
{
{
        int count = file->f_count-1;
        int count = file->f_count-1;
        if (!count)
        if (!count)
                __fput(file, inode);
                __fput(file, inode);
        file->f_count = count;
        file->f_count = count;
}
}
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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