[PATCH] Change INTERNAL_SYSCALL* so that it supports both arches which have error embedded in retval and arches which signal error otherwise
Roland McGrath
roland@redhat.com
Mon Jan 6 01:19:00 GMT 2003
> The usage is like:
> INTERNAL_SYSCALL_DECL (err);
> retval = INTERNAL_SYSCALL (syscall_name, err, 3, arg1, arg2, arg3);
> if (INTERNAL_SYSCALL_ERROR_P (retval, err))
> errno_from_syscall = INTERNAL_SYSCALL_ERRNO (retval, err);
I guess this is ok, but a little bulky. If it's always `int err' and
nonzero to indicate, on x86 that's something like "err = retval < 0 ?
-retval : 0;". Does the compiler really fail to eliminate all that work if
`err' is dead?
More information about the Libc-hacker
mailing list