From 1a80521990a0e30e61a92994a009adc52161b070 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Tue, 16 Oct 2007 01:27:28 -0700 Subject: uml: use *SEC_PER_*SEC constants There are various uses of powers of 1000, plus the odd BILLION constant in the time code. However, there are perfectly good definitions of *SEC_PER_*SEC in linux/time.h which can be used instaed. These are replaced directly in kernel code. Userspace code imports those constants as UM_*SEC_PER_*SEC and uses these. Signed-off-by: Jeff Dike Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/include/common-offsets.h | 4 ++++ arch/um/include/os.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/um/include') diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h index 54694693f400..0edab695ed4e 100644 --- a/arch/um/include/common-offsets.h +++ b/arch/um/include/common-offsets.h @@ -34,3 +34,7 @@ DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); DEFINE(UM_THREAD_SIZE, THREAD_SIZE); DEFINE(UM_HZ, HZ); + +DEFINE(UM_USEC_PER_SEC, USEC_PER_SEC); +DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); +DEFINE(UM_NSEC_PER_USEC, NSEC_PER_USEC); diff --git a/arch/um/include/os.h b/arch/um/include/os.h index a1b0804ee57b..fbf0a87c6eaa 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h @@ -249,8 +249,6 @@ extern int setjmp_wrapper(void (*proc)(void *, void *), ...); extern void os_dump_core(void); /* time.c */ -#define BILLION (1000 * 1000 * 1000) - extern void idle_sleep(unsigned long long nsecs); extern int set_interval(void); extern int timer_one_shot(int ticks); -- cgit v1.2.3