This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FreeBSD port (60): system calls

> Here is the system call infrastructure. Notes:
> - The syscalls list includes some FreeBSD syscalls which are not used
>   in libc but which are provided so that some specific programs can
>   use them, in case they need them.

We like to avoid implicit parts of the ABI.  Since you didn't include a
version script, these will only be available to static programs but that is
probably not what you had in mind.  Are these syscalls not declared
anywhere at all in FreeBSD?

> - sysdep.h is different from the Linux one because FreeBSD system
> - fork, vfork, rfork are special because they return two words in two

This is all as BSD has always been, and the libc code supported systems
with BSD style syscalls before it supported Linux.  Why can't you just use
sysdeps/unix/i386/{v,}fork.S?  And then add a sysdeps/unix/alpha/{v,}fork.S
as well, for benefit of any other port that might need it.
(unix/bsd/osf/alpha/fork.S should be consolidated with yours to
unix/alpha/fork.S, likewise vfork).  Don't put these syscalls in your
syscalls.list so it won't override the other sources.

In cases like */rfork.S and alpha/vfork.S where it's identical but for the
names, I would rather see a file that did some #define's and an #include.

sysdep.S should not be defining errno any more, it's probably a multiple
definition error if you build with current sources.

For sys_lseek.S, I would introduce another intermediate macro used by
sysdep.h so that you can just redefine the part for storing -1 and not
duplicate all the code.  Then e.g. if you change sysdep.h to use TLS later,
you won't have to update sys_lseek.S too.

We should move the SYSCALL_ERROR_HANDLER defn from
sysdeps/unix/sysv/linux/i386/sysdep.h to sysdeps/unix/i386/sysdep.h so you
don't have to duplicate it.

In alpha/sysdep.h the INLINE_SYSCALL redefinition should not be necessary,
that should be the generic definition you get from sysdeps/unix/sysdep.h.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]