From: "H. Peter Anvin" <hpa@zytor.com>
To: Masatake YAMATO <jet@gyve.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] sharing maximum errno symbol used in __syscall_return (i386)
Date: Tue, 20 Jun 2006 23:05:31 -0700 [thread overview]
Message-ID: <4498E1AB.5050107@zytor.com> (raw)
In-Reply-To: <20060621.150212.138089156.jet@gyve.org>
Masatake YAMATO wrote:
>>> Hi,
>>>
>>> __syscall_return in unistd.h is maintained?
>>>
>>> In the macro the value returned from system call is
>>> compared with the maximum error number defined in a header file
>>> to know the call is successful or not. However, the maximum error number
>>> is hard-coded and is not updated.
>>>
>> And it's wrong, anyway. It has long been agreed that the maximum errno
>> value, for any architecture, is 4095.
>
> So we should do just:
>
>
> #define GENERIC_ERRNO_MAX 4095
>
> Here my patch is proved to be useful for maintaining __syscall_return:-P
>
Well, most of the various macros in unistd.h really should go too, since
they're mostly underutilized and definitely ill-maintained.
The only one that I know of which is still used by the kernel itself is
execve. If so, perhaps we should just have an open-coded execve.
-hpa
prev parent reply other threads:[~2006-06-21 6:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 9:40 [patch] sharing maximum errno symbol used in __syscall_return (i386) Masatake YAMATO
2006-06-21 0:04 ` Randy.Dunlap
2006-06-21 4:21 ` H. Peter Anvin
2006-06-21 6:02 ` Masatake YAMATO
2006-06-21 6:05 ` H. Peter Anvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4498E1AB.5050107@zytor.com \
--to=hpa@zytor.com \
--cc=jet@gyve.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox