[Libsysio-commit] unification: libsysio/src rw.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-04-12 17:27:02
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12084 Modified Files: Tag: unification rw.c Log Message: Rewritten to work with file handles by pnode, new graph architecture semantics and to reduce redundant code paths. Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.16.4.1 retrieving revision 1.16.4.2 diff -u -w -b -B -p -r1.16.4.1 -r1.16.4.2 --- rw.c 5 Feb 2007 15:54:28 -0000 1.16.4.1 +++ rw.c 12 Apr 2007 17:26:58 -0000 1.16.4.2 @@ -36,7 +36,7 @@ * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 - * Albuquerque, NM 87185-1110 + * Albuquerque, NM 87185-1319 * * le...@sa... */ @@ -44,6 +44,7 @@ #include <stdlib.h> #include <unistd.h> [...1940 lines suppressed...] +SYSIO_INTERFACE_NAME(read)(int fd, void *buf, size_t count) { - SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; - SYSIO_INTERFACE_RETURN(-1, -ENOSYS); + return _do_io(fd, SYSIO_INTERFACE_NAME(iread), buf, count); +} + +ssize_t +SYSIO_INTERFACE_NAME(write)(int fd, const void *buf, size_t count) +{ + + return _do_io(fd, + (ioid_t (*)(int, + void *, + size_t))SYSIO_INTERFACE_NAME(iwrite), + (void *)buf, count); } -#endif |