unblock the processes when the device drivers die.
fp->fp_rootdir = NIL_INODE;
fp->fp_workdir = NIL_INODE;
- /* If a driver exits, unmap its entries in the dmap table. */
+ /* If a driver exits, unmap its entries in the dmap table.
+ * Also check if any process is SUSPENDed on it.
+ */
dmap_unmap_by_proc(exitee);
+ unsuspend_by_proc(exitee);
/* If a session leader exits then revoke access to its controlling tty from
* all other processes using it.
}
}
+/*===========================================================================*
+ * unsuspend_by_proc *
+ *===========================================================================*/
+void unsuspend_by_proc(int proc)
+{
+ struct fproc *rp;
+ int client = 0;
+
+ /* Revive processes waiting for drivers (SUSPENDed) that have
+ * disappeared with return code EIO.
+ */
+ for (rp = &fproc[0]; rp < &fproc[NR_PROCS]; rp++, client++)
+ if(rp->fp_suspended == SUSPENDED && rp->fp_task == -proc)
+ revive(client, EIO);
+
+ return;
+}
+
+
/*===========================================================================*
* release *
*===========================================================================*/
_PROTOTYPE( struct buf *get_block, (Dev_t dev, block_t block,int only_search));
_PROTOTYPE( void invalidate, (Dev_t device) );
_PROTOTYPE( void put_block, (struct buf *bp, int block_type) );
-_PROTOTYPE( void rw_block, (struct buf *bp, int rw_flag) );
_PROTOTYPE( void rw_scattered, (Dev_t dev,
struct buf **bufq, int bufqsize, int rw_flag) );
_PROTOTYPE( int select_request_pipe, (struct filp *f, int *ops, int bl) );
_PROTOTYPE( int select_cancel_pipe, (struct filp *f) );
_PROTOTYPE( int select_match_pipe, (struct filp *f) );
+_PROTOTYPE( void unsuspend_by_proc, (int) );
/* protect.c */
_PROTOTYPE( int do_access, (void) );