VFS - no CANCEL for async non-blocking operations
- if an operation (R, W, IOCTL) is non blocking, a flag is set and sent to the device. - nothing changes for sync devices - asyn devices should reply asap if an operation is non-blocking. We must trust the devices, but we had to trust them anyway to reply to CANCEL correctly - we safe sending CANCEL commands to asyn devices. This greatly simplifies the protocol. Asynchronous devices can always reply when a reply is ready and do not need to deal with other situations - currently, none of our drivers use the flags since they drive virtual devices which do not block
This commit is contained in:
@@ -11,7 +11,7 @@ struct chardriver {
|
||||
_PROTOTYPE( struct device *(*cdr_prepare), (dev_t device) );
|
||||
_PROTOTYPE( int (*cdr_transfer), (endpoint_t endpt, int opcode,
|
||||
u64_t position, iovec_t *iov, unsigned int nr_req,
|
||||
endpoint_t user_endpt) );
|
||||
endpoint_t user_endpt, unsigned int flags) );
|
||||
_PROTOTYPE( void (*cdr_cleanup), (void) );
|
||||
_PROTOTYPE( void (*cdr_alarm), (message *m_ptr) );
|
||||
_PROTOTYPE( int (*cdr_cancel), (message *m_ptr) );
|
||||
|
||||
@@ -225,6 +225,9 @@
|
||||
#define HIGHPOS m2_l2 /* file offset (high 4 bytes) */
|
||||
#define ADDRESS m2_p1 /* core buffer address */
|
||||
#define IO_GRANT m2_p1 /* grant id (for DEV_*_S variants) */
|
||||
#define FLAGS m2_s1 /* operation flags */
|
||||
|
||||
#define FLG_OP_NONBLOCK 0x1 /* operation is non blocking */
|
||||
|
||||
/* Field names for DEV_SELECT messages to character device drivers. */
|
||||
#define DEV_MINOR m2_i1 /* minor device */
|
||||
|
||||
Reference in New Issue
Block a user