Moved the select stuff into its own header file for now which is now included

from both, Drivers.h, and fs_interface.h.
The latter no longer includes vfs_types.h for iovecs, but <sys/uio.h> for iovec.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9140 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-10-01 00:28:57 +00:00
parent a83233417d
commit 8384cc5c92
3 changed files with 51 additions and 17 deletions
+4 -16
View File
@@ -5,6 +5,8 @@
#include <sys/types.h>
#include <sys/uio.h>
#include <SupportDefs.h>
#include <Select.h>
#ifdef __cplusplus
extern "C" {
@@ -14,20 +16,6 @@ extern "C" {
these hooks are how the kernel accesses the device
--- */
struct selectsync;
typedef struct selectsync selectsync;
#ifndef B_SELECT_READ
/* those were lacking for quite some time...
yes the select API will get deprecated, but for now that goes here. */
#define B_SELECT_READ 1
#define B_SELECT_WRITE 2
#define B_SELECT_EXCEPTION 3
// that's Be's prototype...
//extern void notify_select_event(selectsync * sync, uint32 ref);
// moved from current/headers/private/kernel/vfs.h
extern status_t notify_select_event(struct selectsync *sync, uint32 ref, uint8 event);
#endif
typedef status_t (*device_open_hook) (const char *name, uint32 flags, void **cookie);
typedef status_t (*device_close_hook) (void *cookie);
typedef status_t (*device_free_hook) (void *cookie);
@@ -41,9 +29,9 @@ typedef status_t (*device_select_hook) (void *cookie, uint8 event, uint32 ref,
selectsync *sync);
typedef status_t (*device_deselect_hook) (void *cookie, uint8 event,
selectsync *sync);
typedef status_t (*device_read_pages_hook)(void *deviceCookie, off_t position, const iovec *vec,
typedef status_t (*device_read_pages_hook)(void *cookie, off_t position, const iovec *vec,
size_t count, size_t *_numBytes);
typedef status_t (*device_write_pages_hook) (void *deviceCookie, off_t position, const iovec *vec,
typedef status_t (*device_write_pages_hook) (void *cookie, off_t position, const iovec *vec,
size_t count, size_t *_numBytes);
#define B_CUR_DRIVER_API_VERSION 2