[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081203.212313.74138057.davem@davemloft.net>
Date: Wed, 03 Dec 2008 21:23:13 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: paulus@...ba.org
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Joakim.Tjernlund@...nsmode.se
Subject: Re: [PATCH] Allow times and time system calls to return small
negative values
From: Paul Mackerras <paulus@...ba.org>
Date: Thu, 4 Dec 2008 16:06:56 +1100
> At the moment, the times() system call will appear to fail for a
> period shortly after boot, while the value it want to return is
> between -4095 and -1. The same thing will also happen for the time()
> system call on 32-bit platforms some time in 2106 or so.
>
> On some platforms, such as x86, this is unavoidable because of the
> system call ABI, but other platforms such as powerpc have a separate
> error indication from the return value, so system calls can in fact
> return small negative values without indicating an error. On those
> platforms, force_successful_syscall_return() provides a way to
> indicate that the system call return value should not be treated as an
> error even if it is in the range which would normally be taken as a
> negative error number.
>
> This adds a force_successful_syscall_return() call to the time() and
> times() system calls plus their 32-bit compat versions, so that they
> don't erroneously indicate an error on those platforms whose system
> call ABI has a separate error indication. This will not affect
> anything on other platforms.
>
> Joakim Tjernlund added the fix for time() and the compat versions of
> time() and times(), after I did the fix for times().
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>
> Signed-off-by: Paul Mackerras <paulus@...ba.org>
Acked-by: David S. Miller <davem@...emloft.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists