[Libsysio-commit] HEAD: libsysio/include sysio.h
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2004-06-16 13:58:35
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29040/include Modified Files: sysio.h Log Message: Changes from Nik Livic and myself to support accounting on Red Storm. NB: We are tracking chars transferred to/from the underlying driver and not what is moved over the wire. Index: sysio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -w -b -B -p -r1.23 -r1.24 --- sysio.h 28 May 2004 11:51:52 -0000 1.23 +++ sysio.h 16 Jun 2004 13:58:26 -0000 1.24 @@ -398,3 +398,18 @@ extern void _sysio_sysleave(); #define SYSIO_LEAVE #endif + +/* accounting for IO stats read and write char count */ +#if defined(REDSTORM) +#define _SYSIO_UPDACCT(w, cc) \ + do { \ + if ((cc) < 0) \ + break; \ + if (!w) \ + _add_iostats(0, (size_t )(cc)) \ + else \ + _add_iostats((size_t )(cc), 0) \ + } while(0) +#else +#define _SYSIO_UPDACCT(w, cc) +#endif |