Messages in this thread | | | Date | Wed, 28 Dec 2011 11:02:03 -0800 | From | Arun Sharma <> | Subject | Re: [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
| |