[klibc] [patch] s390: vfork support

H. Peter Anvin hpa at zytor.com
Sat Jun 10 12:13:19 PDT 2006


Heiko Carstens wrote:
> 
> s390 has two ways to deal with syscalls with six parameters: the old one
> is to put all six arguments in a structure and pass a pointer to the
> structure with the syscall (see e.g. s390 mmap implementation).
> The new one is to put the additional parameters in registers too, that
> is %r7 for the 6th argument.
> And yes, you're right. We need special arch code for the following syscalls:
> sys_futex (not supported in klibc, yet(?))
> sys_pselect6
> sys_splice
> sys_sync_file_range (only on s390 because of the off_t arguments)
> 

I just implemented a new facility in the klibc build: it now generates a 
list of types present in SYSCALLS.def, and queries the C compiler for 
the type sizes.  The end result is a Perl hash, %typesize, which 
contains the sizes of all the syscall argument types plus a few common 
types like "void *".  The purpose of this, of course, is to let the stub 
generator know how many registers a particular argument requires; the 
stub generated can be adjusted accordingly.

	-hpa



More information about the klibc mailing list