lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 20 Jun 2006 23:05:31 -0700
From"H. Peter Anvin" <>
SubjectRe: [patch] sharing maximum errno symbol used in __syscall_return (i386)
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-21 08:08    [from the cache]
©2003-2009