The time has come for a kernel interfacing library layer

Joerg Sonnenberger joerg at
Mon May 9 09:19:05 PDT 2005

On Mon, May 09, 2005 at 09:05:51AM -0700, Matthew Dillon wrote:
>     I want to keep the advantage we have with the current system call 
>     model where we don't mess with errno at all unless the system call 
>     actually returns an error.

Sure, I want to keep that too. Actually, we have to do that,
since it is the behaviour enforced by POSIX.

>     At the moment I do not see a solution better then having the (user level)
>     system call layer store errno directly in the tcb.  Even a custom
>     threading library would have to use our tls_tcb structure, otherwise
>     the dynamic linker won't work.  So it's not going to be any worse then
>     what we already have and the advantage is that the system call layer
>     then becomes extremely clean.

We currently don't depend on any TLS mechanism in rtld and
adding such a requirement is a bad thing. Having the shared
memory segment as part of "special" ELF section would solve this,
it could be addressed with the normal PIC mechanism. It could be
placed at a fixed offset in the kernel space and the address given
to CSU.


More information about the Kernel mailing list