[PATCH 1/6] Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN
H.J. Lu
hjl.tools@gmail.com
Fri Aug 21 16:11:00 GMT 2015
On Fri, Aug 21, 2015 at 9:07 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> Another question: does INLINE_SYSCALL_ERROR_RETURN belong in
> sysdeps/unix/sysdep.h at all? The interface and the comment relate to a
> Linux error handling convention (return of negative errno values from
> syscalls). It might be better to create sysdeps/unix/sysv/linux/sysdep.h
> and make all Linux architectures use it.
I put it there since this is where INLINE_SYSCALL is defined.
> The fact that every call to INLINE_SYSCALL_ERROR_RETURN has a negation as
> its first argument suggests that the interface itself is problematic and
> there should be a version of the macro that takes the normal errno value,
> not negated, and then for the cases added in your next patch where you
> really do want to pass the Linux return value straight through, have a
> separate variant of the macro (one macro could call the other).
>
I can add sysdeps/unix/sysv/linux/sysdep.h and define them
here. Do want to do it?
--
H.J.
More information about the Libc-alpha
mailing list