Retire the synchronous character driver protocol
- change all sync char drivers into async drivers; - retire support for the sync protocol in libchardev; - remove async dev style, as this is now the default; - remove dev_status from VFS; - clean up now-unused protocol messages. Change-Id: I6aacff712292f6b29f2ccd51bc1e7d7003723e87
This commit is contained in:
@@ -108,8 +108,5 @@
|
||||
|
||||
#define VFS_VMCALL 117
|
||||
|
||||
#define TASK_REPLY 121 /* to VFS: reply code from drivers, not
|
||||
* really a standalone call.
|
||||
*/
|
||||
#define MAPDRIVER 122 /* to VFS, map a device */
|
||||
#define GETRUSAGE 123 /* to PM, VFS */
|
||||
|
||||
@@ -19,17 +19,12 @@ struct chardriver {
|
||||
int(*cdr_other) (message *m_ptr);
|
||||
};
|
||||
|
||||
#define CHARDRIVER_SYNC 0 /* use the synchronous protocol */
|
||||
#define CHARDRIVER_ASYNC 1 /* use the asynchronous protocol */
|
||||
|
||||
#define IS_CDEV_MINOR_RQ(type) (IS_DEV_RQ(type) && (type) != DEV_STATUS)
|
||||
|
||||
/* Functions defined by libchardriver. */
|
||||
void chardriver_announce(void);
|
||||
void chardriver_process(struct chardriver *cdp, int driver_type, message
|
||||
*m_ptr, int ipc_status);
|
||||
void chardriver_process(struct chardriver *cdp, message *m_ptr,
|
||||
int ipc_status);
|
||||
void chardriver_terminate(void);
|
||||
void chardriver_task(struct chardriver *cdp, int driver_type);
|
||||
void chardriver_task(struct chardriver *cdp);
|
||||
|
||||
int do_nop(message *m_ptr);
|
||||
void nop_cleanup(void);
|
||||
|
||||
@@ -196,7 +196,6 @@
|
||||
#define DEV_OPEN (DEV_RQ_BASE + 6) /* open a minor device */
|
||||
#define DEV_CLOSE (DEV_RQ_BASE + 7) /* close a minor device */
|
||||
#define DEV_SELECT (DEV_RQ_BASE + 12) /* request select() attention */
|
||||
#define DEV_STATUS (DEV_RQ_BASE + 13) /* request driver status */
|
||||
#define DEV_REOPEN (DEV_RQ_BASE + 14) /* reopen a minor device */
|
||||
|
||||
#define DEV_READ_S (DEV_RQ_BASE + 20) /* (safecopy) read from minor */
|
||||
@@ -208,8 +207,6 @@
|
||||
#define IS_DEV_RQ(type) (((type) & ~0xff) == DEV_RQ_BASE)
|
||||
|
||||
#define DEV_REVIVE (DEV_RS_BASE + 2) /* driver revives process */
|
||||
#define DEV_IO_READY (DEV_RS_BASE + 3) /* selected device ready */
|
||||
#define DEV_NO_STATUS (DEV_RS_BASE + 4) /* empty status reply */
|
||||
#define DEV_REOPEN_REPL (DEV_RS_BASE + 5) /* reply to DEV_REOPEN */
|
||||
#define DEV_CLOSE_REPL (DEV_RS_BASE + 6) /* reply to DEV_CLOSE */
|
||||
#define DEV_SEL_REPL1 (DEV_RS_BASE + 7) /* first reply to DEV_SELECT */
|
||||
@@ -241,12 +238,6 @@
|
||||
#define REP_IO_GRANT m2_i3 /* DEV_REVIVE: grant by which I/O was done */
|
||||
# define SUSPEND -998 /* status to suspend caller, reply later */
|
||||
|
||||
/* Field names for messages to TTY driver. */
|
||||
#define TTY_LINE DEVICE /* message parameter: terminal line */
|
||||
#define TTY_REQUEST COUNT /* message parameter: ioctl request code */
|
||||
#define TTY_SPEK POSITION/* message parameter: ioctl speed, erasing */
|
||||
#define TTY_PGRP m2_i3 /* message parameter: process group */
|
||||
|
||||
/*===========================================================================*
|
||||
* Messages for networking layer *
|
||||
*===========================================================================*/
|
||||
@@ -937,6 +928,11 @@
|
||||
#define VFS_UMOUNT_LABEL m1_p2
|
||||
#define VFS_UMOUNT_LABELLEN m1_i2
|
||||
|
||||
/* Field names for the ioctl(2) call. */
|
||||
#define VFS_IOCTL_FD m2_i1
|
||||
#define VFS_IOCTL_REQ m2_i3
|
||||
#define VFS_IOCTL_ARG m2_p1
|
||||
|
||||
/*===========================================================================*
|
||||
* Messages for VM server *
|
||||
*===========================================================================*/
|
||||
|
||||
@@ -4,12 +4,8 @@
|
||||
#include <minix/sys_config.h>
|
||||
#include <minix/ipc.h>
|
||||
|
||||
enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_DEVA, STYLE_TTY, STYLE_CTTY,
|
||||
STYLE_CLONE, STYLE_CLONE_A };
|
||||
#define IS_DEV_STYLE(s) (s>=STYLE_NDEV && s<=STYLE_CLONE_A)
|
||||
|
||||
#define dev_style_asyn(devstyle) ((devstyle) == STYLE_DEVA || \
|
||||
(devstyle) == STYLE_CLONE_A)
|
||||
enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_TTY, STYLE_CTTY, STYLE_CLONE };
|
||||
#define IS_DEV_STYLE(s) (s>=STYLE_NDEV && s<=STYLE_CLONE)
|
||||
|
||||
/*===========================================================================*
|
||||
* Major and minor device numbers *
|
||||
|
||||
@@ -159,8 +159,6 @@ int sys_umap_data_fb(endpoint_t proc_ep, vir_bytes vir_addr, vir_bytes
|
||||
int sys_umap_remote(endpoint_t proc_ep, endpoint_t grantee, int seg,
|
||||
vir_bytes vir_addr, vir_bytes bytes, phys_bytes *phys_addr);
|
||||
|
||||
int send_taskreply(endpoint_t who, endpoint_t endpoint, int status);
|
||||
|
||||
/* Shorthands for sys_getinfo() system call. */
|
||||
#define sys_getkinfo(dst) sys_getinfo(GET_KINFO, dst, 0,0,0)
|
||||
#define sys_getloadinfo(dst) sys_getinfo(GET_LOADINFO, dst, 0,0,0)
|
||||
|
||||
Reference in New Issue
Block a user