patch-2.2.18 linux/include/linux/file.h
Next file: linux/include/linux/fs.h
Previous file: linux/include/linux/ext2_fs_sb.h
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Wed Nov 22 21:22:41 2000
- Orig file:
v2.2.17/include/linux/file.h
- Orig date:
Fri Apr 21 12:46:59 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/include/linux/file.h linux/include/linux/file.h
@@ -41,6 +41,15 @@
return file;
}
+extern int get_unused_fd(void); /* in fs/open.c */
+
+static inline void put_unused_fd(unsigned int fd)
+{
+ FD_CLR(fd, current->files->open_fds);
+ if (fd < current->files->next_fd)
+ current->files->next_fd = fd;
+}
+
/*
* Install a file pointer in the fd array.
*/
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)