Re: [PATCH 1/4] Add clock_gettime_ns syscall

From: Arun Sharma
Date: Wed Dec 28 2011 - 14:02:37 EST

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at