Re: Q for the standards gurus...

Larry McVoy (
Sat, 10 May 1997 13:43:39 -0700

: What I was *thinking* of (note: *thinking* - not *doing* :-) ) was
: implementing some form of callback system so that we could specify
: an action to be taken (or queued on a particular process to be taken
: next time it is scheduled so we have its user space) when, for
: instance, a given buffer becomes up to date.

Something like:

iodone(char *buf, int len, int retval)
if (retval == -1) {
fprintf(stderr, "I/O on buffer %x for %d failed: %d\n",
buf, len, retval);
} else if (retval < len) {
fprintf(stderr, "I/O on buffer %x wanted %d got %d\n",
buf, len, retval);
} /* else success */

char *buf = valloc(SIZE);

reada(fd, buf, SIZE, iodone);

/* do some other useful work */


Is that what you meant?