Subject: Syscall conventions
To: None <tech-kern@netbsd.org>
From: Ben Harris <bjh21@cam.ac.uk>
List: tech-kern
Date: 03/09/2000 14:43:46
While people are discussing syscalls, I have a question about them.

Looking at the various SYS.hs around in lib/libc/arch, it seems that a lot
of architectures do something like (this from arm32):

#define SYSTRAP(x)      swi SYS_ ## x
#define _SYSCALL_NOERROR(x,y)                                           \
        ENTRY(x);                                                       \
        SYSTRAP(y)
#define SYSCALL_NOERROR(x)                                              \
        _SYSCALL_NOERROR(x,x)

So the system call function doesn't have a return instruction.  Does this
mean that the kernel munges the registers on return from the system call
to return from the function as well?  Please tell me it doesn't!

-- 
Ben Harris
Unix Support, University of Cambridge Computing Service.