Implemented disconnecting file descriptors: this will be used by the

force unmounting code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15949 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-01-15 17:11:48 +00:00
parent e0ad7cc913
commit 128165101a
2 changed files with 50 additions and 6 deletions
+8 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2005, Axel Dörfler, [email protected].
* Copyright 2002-2006, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef _FD_H
@@ -61,6 +61,8 @@ enum fd_types {
FDTYPE_SOCKET
};
// additional open mode - kernel special
#define O_DISCONNECTED 0x80000000
/* Prototypes */
@@ -70,8 +72,11 @@ extern int new_fd(struct io_context *, struct file_descriptor *);
extern struct file_descriptor *get_fd(struct io_context *, int);
extern void close_fd(struct file_descriptor *descriptor);
extern void put_fd(struct file_descriptor *descriptor);
extern status_t select_fd(int fd, uint8 event, uint32 ref, struct select_sync *sync, bool kernel);
extern status_t deselect_fd(int fd, uint8 event, struct select_sync *sync, bool kernel);
extern void disconnect_fd(struct file_descriptor *descriptor);
extern status_t select_fd(int fd, uint8 event, uint32 ref,
struct select_sync *sync, bool kernel);
extern status_t deselect_fd(int fd, uint8 event, struct select_sync *sync,
bool kernel);
extern bool fd_is_valid(int fd, bool kernel);
extern struct vnode *fd_vnode(struct file_descriptor *descriptor);