Adding system call connections
Thu Dec 8 21:55:00 GMT 2005
2005/12/8, Ralf Corsepius <firstname.lastname@example.org>:
> These OSes treat these functions as "part of the OS" and not of
> "newlib's business".
> Or to put it conversely: These functions' implementations require an
> amount of knowledge about an OS's internals newlib has no possibility to
> know about.
To me, newlib knows as much about write(2) as it does about chdir(2).
Namely that it's a syscall. The newlib/syscalls directory provides a
xxx function that calls either _xxx or _xxx_r (depending on the
reentrancy configuration). If a syscall such as write is provided, I
assumed that if a syscall such as chdir is not, it's simply an
omission. Is there a design reason why write calls _write, which is
handled by the OS layer, versus chdir, which is currently handled by
the OS layer directly?
> Without having seen your work, I fail to see the benefits.
The benefit is parallelism. That is to say, all syscalls that are
transparent to the libc should behave similarly.
> To me this all sounds as if you are going to shift the level of
> "OS-bindings" from "xxx" to "_xxx" and thereby introduce
The "OS-bindings" currently seem to be a mix of xxx and _xxx
functions. Why is that?
> Am I missing something?
Perhaps you are, or perhaps I am!
More information about the Newlib