lkml.org 
[lkml]   [2011]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] Add clock_gettime_ns syscall
On 12/25/11 8:51 AM, Andy Lutomirski wrote:

> +struct timens {
> + u64 ns; /* nanoseconds since the relevant epoch */
> + u64 padding; /* for future expansion (UTC offset? sub-ns?) */
> +};
>..
> +SYSCALL_DEFINE2(clock_gettime_ns, const clockid_t, which_clock,
> + struct timens __user *, tp)
> +{

How about returning a (signed) long as the time in ns? This way, we save
a store and a load and the value can be passed in registers.

This shouldn't preclude future expansion via extra args.

-Arun


\
 
 \ /
  Last update: 2011-12-28 20:05    [W:0.193 / U:1.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site