[Libsysio-commit] HEAD: libsysio/src ioctx.c iowait.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2003-10-17 21:30:33
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1:/tmp/cvs-serv10931/src Modified Files: ioctx.c iowait.c Log Message: Added a done bit to the IO context record to *positively* signal completion. Also, added a driver private pointer to the dsame record for handy use. Index: ioctx.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctx.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -b -B -p -r1.5 -r1.6 --- ioctx.c 13 Oct 2003 02:43:17 -0000 1.5 +++ ioctx.c 17 Oct 2003 21:30:29 -0000 1.6 @@ -172,7 +172,8 @@ _sysio_ioctx_wait(struct ioctx *ioctx) /* * Wait for async operation to complete. */ - while (!(*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx)) + while (!(ioctx->ioctx_done || + (*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx))) ; /* @@ -197,19 +198,7 @@ _sysio_ioctx_wait(struct ioctx *ioctx) void _sysio_ioctx_complete(struct ioctx *ioctx) { -#if 0 - struct inode *ino; -#endif struct ioctx_callback *entry; - -#if 0 - /* - * Wait for IO to complete and remember completion values. - */ - ino = ioctx->ioctx_ino; - while (ino && !(*ino->i_ops.inop_iodone)(ioctx)) - ; -#endif /* * Run the call-back queue. Index: iowait.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/iowait.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- iowait.c 9 Mar 2003 06:25:45 -0000 1.3 +++ iowait.c 17 Oct 2003 21:30:29 -0000 1.4 @@ -75,7 +75,8 @@ iodone(ioid_t ioid) if (!ioctx) return -1; - return (*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx); + return (ioctx->ioctx_done || + (*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx)); } /* |