* Renamed fs/vfs_select.cpp to wait_for_objects.cpp and got rid of
vfs_select.h, respectively moved most of it into the new kernel private header wait_for_objects.h. * Added new experimental API functions wait_for_objects[_etc](). They work pretty much like poll(), but also for semaphores, ports, and threads. * Removed the "ref" parameter from notify_select_events() and the select_sync_pool functions as well as from fd_ops::fd_[de]select(). It is no longer needed. The FS interface select() hook still has it, though -- the VFS will always pass 0. * de]select_fd() take a select_info* instead of a select_sync* + ref pair, now. Added respective functions for semaphores, ports, and threads. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22416 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,14 +17,14 @@ extern "C" {
|
||||
|
||||
struct file_descriptor;
|
||||
struct selectsync;
|
||||
struct select_sync;
|
||||
struct select_info;
|
||||
|
||||
struct fd_ops {
|
||||
status_t (*fd_read)(struct file_descriptor *, off_t pos, void *buffer, size_t *length);
|
||||
status_t (*fd_write)(struct file_descriptor *, off_t pos, const void *buffer, size_t *length);
|
||||
off_t (*fd_seek)(struct file_descriptor *, off_t pos, int seekType);
|
||||
status_t (*fd_ioctl)(struct file_descriptor *, ulong op, void *buffer, size_t length);
|
||||
status_t (*fd_select)(struct file_descriptor *, uint8 event, uint32 ref,
|
||||
status_t (*fd_select)(struct file_descriptor *, uint8 event,
|
||||
struct selectsync *sync);
|
||||
status_t (*fd_deselect)(struct file_descriptor *, uint8 event,
|
||||
struct selectsync *sync);
|
||||
@@ -77,10 +77,8 @@ extern void close_fd(struct file_descriptor *descriptor);
|
||||
extern void put_fd(struct file_descriptor *descriptor);
|
||||
extern void disconnect_fd(struct file_descriptor *descriptor);
|
||||
extern void inc_fd_ref_count(struct file_descriptor *descriptor);
|
||||
extern status_t select_fd(int fd, struct select_sync *sync, uint32 ref,
|
||||
bool kernel);
|
||||
extern status_t deselect_fd(int fd, struct select_sync *sync, uint32 ref,
|
||||
bool kernel);
|
||||
extern status_t select_fd(int32 fd, struct select_info *info, bool kernel);
|
||||
extern status_t deselect_fd(int32 fd, struct select_info *info, bool kernel);
|
||||
extern bool fd_is_valid(int fd, bool kernel);
|
||||
extern struct vnode *fd_vnode(struct file_descriptor *descriptor);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ extern "C" {
|
||||
|
||||
|
||||
status_t add_select_sync_pool_entry(select_sync_pool **pool, selectsync *sync,
|
||||
uint32 ref, uint8 event);
|
||||
uint8 event);
|
||||
status_t remove_select_sync_pool_entry(select_sync_pool **pool,
|
||||
selectsync *sync, uint8 event);
|
||||
void delete_select_sync_pool(select_sync_pool *pool);
|
||||
|
||||
Reference in New Issue
Block a user