lkml.org 
[lkml]   [2005]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 1/1] alpha/osf_sys: use helper functions to convert between tv and jiffies
Date
On Saturday 14 May 2005 01:44, domen@coderock.org wrote:
> Use helper functions to convert between timeval structure and jiffies
> rather than custom logic.

> --- quilt.orig/arch/alpha/kernel/osf_sys.c
> +++ quilt/arch/alpha/kernel/osf_sys.c

> - ticks = tmp.tv_usec;
> - ticks = (ticks + (1000000 / HZ) - 1) / (1000000 / HZ);
> - ticks += tmp.tv_sec * HZ;
> + ticks = timeval_to_jiffies(&tmp);

> - tmp.tv_sec = ticks / HZ;
> - tmp.tv_usec = ticks % HZ;
> + jiffies_to_timeval(ticks, &tmp);

Nitpicking comment: both timeval_to_jiffies and jiffies_to_timeval are
prototyped in include/linux/jiffies.h. However, arch/alpha/kernel/osf_sys.c
doesn't directly #include it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-14 13:27    [W:0.046 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site