[klibc] Re: [patch] s390: vfork support

Martin Schwidefsky schwidefsky at de.ibm.com
Wed Jun 7 10:01:13 PDT 2006


On Wed, 2006-06-07 at 09:09 -0700, H. Peter Anvin wrote:
> > diff -purN a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
> > --- a/usr/klibc/SYSCALLS.def	2006-06-07 09:44:33.000000000 +0200
> > +++ b/usr/klibc/SYSCALLS.def	2006-06-07 13:01:54.000000000 +0200
> > @@ -28,7 +28,7 @@ void _exit,exit::_exit(int)
> >  ; A lot of architectures need architecture-specific vfork
> >  ; stubs, due to the no-stack requirement.  These are the
> >  ; architectures which don't.
> > -<alpha,m32r,ppc,ppc64,sh> pid_t vfork()
> > +<alpha,m32r,ppc,ppc64,sh,s390,s390x> pid_t vfork()
> >  <sparc,sparc64> pid_t vfork at forkish()
> >  #endif
> >  <!alpha> pid_t getpid()
> 
> More strongly... does the s390(x) really not use the stack at all, 
> *including for the return address* for the standard syscall stub?

s390 uses registers %r2 to %r6 to pass up to 5 parameters and %r14 for
the return address. The result of a function call is passed in %r2.
So yes, the vfork call does not use any stack at all.

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.




More information about the klibc mailing list