aboutsummaryrefslogtreecommitdiff
path: root/src/drv/event/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/drv/event/include')
-rw-r--r--src/drv/event/include/drv/event.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/drv/event/include/drv/event.h b/src/drv/event/include/drv/event.h
index 5707242..acd3659 100644
--- a/src/drv/event/include/drv/event.h
+++ b/src/drv/event/include/drv/event.h
@@ -23,6 +23,8 @@
#include <stdbool.h>
#include <stddef.h>
+struct drv_port;
+
struct drv_event_done
{
int (*f)(int error, void *args);
@@ -31,12 +33,12 @@ struct drv_event_done
struct drv_event_ops
{
- int (*read)(void *buf, size_t n, off_t offset,
- const struct drv_event_done *done, void *args);
- int (*read_nb)(void *buf, size_t n, void *args);
- int (*write)(const void *buf, size_t n, const struct drv_event_done *done,
- void *args);
- void *args;
+ int (*read)(struct drv_port *p, void *buf, size_t n, off_t offset,
+ const struct drv_event_done *done);
+ int (*read_nb)(struct drv_port *p, void *buf, size_t n);
+ int (*write)(struct drv_port *p, const void *buf, size_t n,
+ const struct drv_event_done *done);
+ struct drv_port *p;
};
struct drv_event