From: Kevin Lyles Date: Sat, 14 Jun 2008 05:32:46 +0000 (+0000) Subject: Moved struct process to top.h X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=59704d5e3e39ec6e150d95727d43c1b9e8763eb4;p=monky Moved struct process to top.h git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1153 7f574dfc-610e-0410-a909-a81674777703 --- diff --git a/src/conky.h b/src/conky.h index 970f0d1..a07400d 100644 --- a/src/conky.h +++ b/src/conky.h @@ -35,6 +35,7 @@ #endif /* HAS_MCHECK_H */ #include "config.h" +#include "top.h" #include #include #include @@ -644,27 +645,6 @@ struct obsd_sensors_struct obsd_sensors; enum { PB_BATT_STATUS, PB_BATT_PERCENT, PB_BATT_TIME }; void get_powerbook_batt_info(char *, size_t, int); -struct process { - struct process *next; - struct process *previous; - - pid_t pid; - char *name; - float amount; - unsigned long user_time; - unsigned long total; - unsigned long kernel_time; - unsigned long previous_user_time; - unsigned long previous_kernel_time; - unsigned long total_cpu_time; - unsigned int vsize; - unsigned int rss; - unsigned int time_stamp; - unsigned int counted; - unsigned int changed; - float totalmem; -}; - struct local_mail_s { char *box; int mail_count; diff --git a/src/top.h b/src/top.h index cf0fccf..b176f34 100644 --- a/src/top.h +++ b/src/top.h @@ -26,6 +26,9 @@ * * $Id$ */ +#ifndef _top_h_ +#define _top_h_ + /* Ensure there's an operating system defined. * compile with gcc -DOS ... * There is *no* default because every OS has it's own way of revealing @@ -77,6 +80,28 @@ * Process class * ******************************************/ +struct process { + struct process *next; + struct process *previous; + + pid_t pid; + char *name; + float amount; + // User and kernel times are in hundredths of seconds + unsigned long user_time; + unsigned long total; + unsigned long kernel_time; + unsigned long previous_user_time; + unsigned long previous_kernel_time; + unsigned long total_cpu_time; + unsigned int vsize; + unsigned int rss; + unsigned int time_stamp; + unsigned int counted; + unsigned int changed; + float totalmem; +}; + struct sorted_process { struct sorted_process *greater; struct sorted_process *less; @@ -85,3 +110,5 @@ struct sorted_process { /* Pointer to head of process list */ void process_find_top(struct process **, struct process **); + +#endif /* _top_h_ */