From b0f535cac5d6f31e380dd17918b9a0f5ff1b39c6 Mon Sep 17 00:00:00 2001 From: 10195501441 <10195501441@stu.ecnu.edu.com> Date: Thu, 18 Mar 2021 17:25:50 +0800 Subject: [PATCH] test mytop --- yeeshell.c | 9 ++++----- yeeshell.h | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/yeeshell.c b/yeeshell.c index 83b9474..b246071 100644 --- a/yeeshell.c +++ b/yeeshell.c @@ -35,6 +35,10 @@ char *history[CMDLINE_HISTORY_MAX_QUANTITY]; int cmdline_amount = 0; struct proc *proc = NULL, *prev_proc = NULL; +static inline u64_t make64(unsigned long lo, unsigned long hi) +{ + return ((u64_t)hi << 32) | (u64_t)lo; +} int nr_total = 0; unsigned int nr_procs, nr_tasks; @@ -695,9 +699,4 @@ u64_t cputicks(struct proc *p1, struct proc *p2, int timemode) } return t; -} - -static inline u64_t make64(unsigned long lo, unsigned long hi) -{ - return ((u64_t)hi << 32) | (u64_t)lo; } \ No newline at end of file diff --git a/yeeshell.h b/yeeshell.h index f9b251c..91140d9 100644 --- a/yeeshell.h +++ b/yeeshell.h @@ -96,5 +96,4 @@ void parse_dir(); void parse_file(pid_t pid); void getkinfo(); void print_procs(struct proc *proc1, struct proc *proc2, int cputimemode); -u64_t cputicks(struct proc *p1, struct proc *p2, int timemode); -static inline u64_t make64(unsigned long lo, unsigned long hi); \ No newline at end of file +u64_t cputicks(struct proc *p1, struct proc *p2, int timemode); \ No newline at end of file