LWN.net Logo

Advertisement

Front, Kernel, Security, Distributions, Development. See your byline here on LWN.net.

Advertise here

tee() with your splice()?

tee() with your splice()?

Posted Apr 25, 2006 8:24 UTC (Tue) by hozelda (guest, #19341)
In reply to: tee() with your splice()? by RobSeace
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.]


(Log in to post comments)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds