Principles for syscall wrappers, again
Joseph Myers
joseph@codesourcery.com
Thu Jun 4 15:44:00 GMT 2015
On Thu, 4 Jun 2015, Torvald Riegel wrote:
> Also, why would anyone multiplex several logically different operations,
> with type-unsafe parameter multiplexing and all that, into a single C
> function -- instead of just using several C functions? I can't think of
> any reason but wanting to limit the number of functions/syscalls.
Well, I think ioctl is better as a libc interface than providing large
numbers of extremely specialized functions - limiting the size of the libc
interface, while still providing access to specialized operations not
known at the time the interface is added to libc, can make sense. And
then in a few cases we provide higher-level interfaces to ioctls (e.g.
termios).
> OK. I notice you said "only providing higher-level" interfaces; so, do
> I understand you correctly that you're primary concern here is to
> provide futex(), and that you don't necessarily object to a proper
> interface, nor think that offering futex() renders offering a proper
> interface obsolete?
Yes.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list