New read()/write()

From: Robert Mayer - Student <robert_at_nospam.org>
Date: Wed Dec 14 1994 - 11:57:07 PST

Hi all,
  a recent posting to comp.os.linux.devel by Larry McVoy had a very
interesting idea in it. He suggested two new library functions

        new_write(int handle, off_t offset, int cookie);
        new_read(int handle, off_t offset, int cookie);

  These functions would be asynchronous and report completion by
incrementing the cookie (or by calling a function passed as
parameter instead of cookie or whatever). Also since the offset
is passed each time, the question whether two threads that share
a filedescriptor (or port in VSTa) also share the seek pointer
(i.e. the offset that the server associates with the connection)
does not arise at all.

  It seems to me that these functions could be implemented very
easily in VSTa: e.g. new_write() would tfork(), send an ABS_WRITE
message, set the cookie after msg_send() returns (or call the
notifier function, see above) and call texit().

  Do you think something like this would be a useful addition to
libusr.a or libc.a ?

Regards,
Robert.
Received on Wed Dec 14 11:31:58 1994

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:11 PDT