This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


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 1/6] Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN


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.

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).

-- 
Joseph S. Myers
joseph@codesourcery.com


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