From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [sched.h 2/8] nuke CT_TO_SECS() and CT_TO_USECS()
Date: Fri, 24 Sep 2004 19:53:04 -0700 [thread overview]
Message-ID: <20040925025304.GN9106@holomorphy.com> (raw)
In-Reply-To: <20040925024917.GM9106@holomorphy.com>
On Fri, Sep 24, 2004 at 07:49:17PM -0700, William Lee Irwin III wrote:
> Remove itimer_next and itimer_ticks; they are nowhere defined and
> referenced nowhere else.
CT_TO_SECS() and CT_TO_USECS() are used where jiffies_to_timeval()
should be; this patch teaches their sole caller to use that instead and
by so doing removes them from the kernel entirely.
Index: mm3-2.6.9-rc2/arch/mips/kernel/irixelf.c
===================================================================
--- mm3-2.6.9-rc2.orig/arch/mips/kernel/irixelf.c 2004-09-12 22:33:39.000000000 -0700
+++ mm3-2.6.9-rc2/arch/mips/kernel/irixelf.c 2004-09-24 18:45:21.055503104 -0700
@@ -29,6 +29,7 @@
#include <linux/personality.h>
#include <linux/elfcore.h>
#include <linux/smp_lock.h>
+#include <linux/jiffies.h>
#include <asm/uaccess.h>
#include <asm/mipsregs.h>
@@ -1131,14 +1132,10 @@
psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid;
psinfo.pr_pgrp = prstatus.pr_pgrp = process_group(current);
psinfo.pr_sid = prstatus.pr_sid = current->signal->session;
- prstatus.pr_utime.tv_sec = CT_TO_SECS(current->utime);
- prstatus.pr_utime.tv_usec = CT_TO_USECS(current->utime);
- prstatus.pr_stime.tv_sec = CT_TO_SECS(current->stime);
- prstatus.pr_stime.tv_usec = CT_TO_USECS(current->stime);
- prstatus.pr_cutime.tv_sec = CT_TO_SECS(current->cutime);
- prstatus.pr_cutime.tv_usec = CT_TO_USECS(current->cutime);
- prstatus.pr_cstime.tv_sec = CT_TO_SECS(current->cstime);
- prstatus.pr_cstime.tv_usec = CT_TO_USECS(current->cstime);
+ jiffies_to_timeval(current->utime, &prstatus.pr_utime);
+ jiffies_to_timeval(current->stime, &prstatus.pr_stime);
+ jiffies_to_timeval(current->cutime, &prstatus.pr_cutime);
+ jiffies_to_timeval(current->cstime, &prstatus.pr_cstime);
if (sizeof(elf_gregset_t) != sizeof(struct pt_regs)) {
printk("sizeof(elf_gregset_t) (%d) != sizeof(struct pt_regs) "
"(%d)\n", sizeof(elf_gregset_t), sizeof(struct pt_regs));
Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h 2004-09-24 18:38:02.935107528 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h 2004-09-24 18:45:29.052287408 -0700
@@ -85,9 +85,6 @@
load += n*(FIXED_1-exp); \
load >>= FSHIFT;
-#define CT_TO_SECS(x) ((x) / HZ)
-#define CT_TO_USECS(x) (((x) % HZ) * 1000000/HZ)
-
extern int nr_threads;
extern int last_pid;
DECLARE_PER_CPU(unsigned long, process_counts);
next prev parent reply other threads:[~2004-09-25 2:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-25 2:45 [sched.h 0/8] sched.h header cleanups vs. 2.6.9-rc2-mm3 William Lee Irwin III
2004-09-25 2:49 ` [sched.h 1/8] nuke itimer_ticks and itimer_next William Lee Irwin III
2004-09-25 2:53 ` William Lee Irwin III [this message]
2004-09-25 3:08 ` [sched.h 3/8] privatize CALC_LOAD() William Lee Irwin III
2004-09-25 3:19 ` [sched.h 4/8] move struct k_itimer to posix-timers.h William Lee Irwin III
2004-09-25 3:24 ` [sched.h 5/8] move struct mm_struct to mm.h William Lee Irwin III
2004-09-25 3:26 ` [sched.h 6/8] move aio include " William Lee Irwin III
2004-09-25 3:27 ` [sched.h 7/8] remove rbtree.h inclusion from sched.h William Lee Irwin III
2004-09-25 3:29 ` [sched.h 8/8] move exec_domain declarations to personality.h William Lee Irwin III
2004-09-26 1:56 ` [sched.h 6/8] move aio include to mm.h Arnd Bergmann
2004-09-26 2:06 ` William Lee Irwin III
2004-09-26 2:15 ` Lee Revell
2004-09-26 2:17 ` William Lee Irwin III
2004-09-26 3:03 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040925025304.GN9106@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox