tee() with your splice()?
Posted Apr 25, 2006 8:24 UTC (Tue) by hozelda
In reply to: tee() with your splice()?
Parent article: tee() with your splice()?
I really am not sure of the answer to your question, but it made me wonder why not have Linux just have one system call "function()" and simply call it with a different flag depeding on whether we want to read or write or chmod etc. function(READ, fd, buff, bytes) to read, function(WRITE, fd, ...) to write, etc.
Or if we just had to have 2, then "function" and "ioctl" (that's my vote).
If 3: "function" "ioctl" and "read." In particular, read(WRITE, fd, ...) for opening a file, read (OPEN, ...) for duplicating a file descriptor, read (IOCTL, ...) for closing a network connection, function(READ, ...) for reserving memory, and function (CHMOD, ...) for shutting the system. Everything else should be doable with ioctl(..).
Cool! We should suggest this on the mailing lists!!!
[On a serious note, splice and tee may be related; for example, splice(WITH_TEE) might just increment counters beyond 1 and add ptrs to some linked list, etc. I don't really know. Maybe. But what really concerns me is your desire to do away with system calls.]
to post comments)