This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/6] Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 14 Aug 2015 12:53:07 -0700
- Subject: Re: [PATCH 1/6] Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN
- Authentication-results: sourceware.org; auth=none
- References: <20150814120014 dot GA28610 at gmail dot com> <87oaiavy2c dot fsf at igel dot home> <CAMe9rOoP9GPP+i6xbAXwHffwr+KOKNhV=FsJ5sx=G2bM_1SE+g at mail dot gmail dot com> <87oai9vkg7 dot fsf at igel dot home> <CAMe9rOqPmsPPR7RPbdhMKh-cRxK_J2dphmECdvq0QHtfnLgz0w at mail dot gmail dot com> <87k2sxvjh8 dot fsf at igel dot home> <CAMe9rOrbhzbxg2ed3w0i7zE7=KM1q37DtR1vAY_Lk=rxsJ_8mA at mail dot gmail dot com> <87d1ypvixm dot fsf at igel dot home> <CAMe9rOqEpVE3X-drZp6W6UESV0CCAtY3Qew+SPOt1b7Y9BNwfA at mail dot gmail dot com> <878u9dvh61 dot fsf at igel dot home> <CAMe9rOqNhBrGkJCkp5xT8DebN68qzoZciWtSZzGhYo1Msyv3TQ at mail dot gmail dot com>
On Fri, Aug 14, 2015 at 12:16 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Aug 14, 2015 at 11:49 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>
>>> But it still has INLINE_SYSCALL_ERROR_RETURN which hides return.
>>
>> This is something you need to fix.
>>
>
> About this one?
>
These are better names and descriptions:
/* Similar to INLINE_SYSCALL, but with return type. It should only be
used with function return. */
#ifndef INLINE_SYSCALL_RETURN
#define INLINE_SYSCALL_RETURN(name, nr, type, args...) \
INLINE_SYSCALL (name, nr, args)
#endif
/* Set error number and return value. It should only be used with
function return. ERR is the negative error number returned from
the majority of Linux kernels for which -ERR is no-op
with INTERNAL_SYSCALL_ERRNO. */
#ifndef INLINE_SYSCALL_ERROR_RETURN
#define INLINE_SYSCALL_ERROR_RETURN(err, type, value) \
({ \
__set_errno (-err); \
(type) (value); \
})
#endif
--
H.J.