Paul Mackerras e3d5a27d58 Allow times and time system calls to return small negative values
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@transmode.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:13 -08:00
..
2009-01-04 15:14:41 -05:00
2009-01-06 15:59:01 -08:00
2008-11-24 18:57:41 -05:00
2008-10-16 11:21:30 -07:00
2009-01-06 15:59:11 -08:00
2008-09-14 16:25:35 +02:00
2008-07-28 14:37:38 +02:00
2007-07-16 09:05:50 -07:00
2008-11-14 10:39:23 +11:00
2008-12-10 08:01:54 -08:00
2008-08-13 12:55:10 +02:00
2008-10-20 15:43:10 +02:00
2009-01-06 15:59:11 -08:00
2008-09-02 19:21:40 -07:00
2009-01-01 10:12:27 +10:30
2008-10-21 15:59:53 +02:00
2008-11-05 10:30:14 +01:00
2007-07-16 09:05:50 -07:00
2008-02-06 10:41:02 -08:00
2008-11-19 18:49:57 -08:00
2008-12-31 15:11:46 +01:00
2008-10-16 11:21:47 -07:00
2008-10-16 11:21:31 -07:00