This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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: [PATCH] Change INTERNAL_SYSCALL* so that it supports both arches which have error embedded in retval and arches which signal error otherwise


> 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?


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