custom message for SHMGET
[minix3.git] / include / minix / chardriver.h
blob48f67ae84712acc76a4d96bf4e4cf96b3743a461
1 #ifndef _MINIX_CHARDRIVER_H
2 #define _MINIX_CHARDRIVER_H
4 #include <minix/driver.h>
6 typedef unsigned int cdev_id_t;
8 /* Entry points into the device dependent code of character drivers. */
9 struct chardriver {
10 int (*cdr_open)(devminor_t minor, int access, endpoint_t user_endpt);
11 int (*cdr_close)(devminor_t minor);
12 ssize_t (*cdr_read)(devminor_t minor, u64_t position, endpoint_t endpt,
13 cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
14 ssize_t (*cdr_write)(devminor_t minor, u64_t position, endpoint_t endpt,
15 cp_grant_id_t grant, size_t size, int flags, cdev_id_t id);
16 int (*cdr_ioctl)(devminor_t minor, unsigned long request, endpoint_t endpt,
17 cp_grant_id_t grant, int flags, endpoint_t user_endpt, cdev_id_t id);
18 int (*cdr_cancel)(devminor_t minor, endpoint_t endpt, cdev_id_t id);
19 int (*cdr_select)(devminor_t minor, unsigned int ops, endpoint_t endpt);
20 void (*cdr_intr)(unsigned int mask);
21 void (*cdr_alarm)(clock_t stamp);
22 void (*cdr_other)(message *m_ptr, int ipc_status);
25 /* Functions defined by libchardriver. */
26 void chardriver_announce(void);
27 int chardriver_get_minor(message *m, devminor_t *minor);
28 void chardriver_process(struct chardriver *cdp, message *m_ptr,
29 int ipc_status);
30 void chardriver_terminate(void);
31 void chardriver_task(struct chardriver *cdp);
33 void chardriver_reply_task(endpoint_t endpt, cdev_id_t id, int r);
34 void chardriver_reply_select(endpoint_t endpt, devminor_t minor, int ops);
36 #endif /* _MINIX_CHARDRIVER_H */