1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

Moved struct process to top.h

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1153 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Kevin Lyles 2008-06-14 05:32:46 +00:00
parent 83bf37fe85
commit 59704d5e3e
2 changed files with 28 additions and 21 deletions

View File

@ -35,6 +35,7 @@
#endif /* HAS_MCHECK_H */ #endif /* HAS_MCHECK_H */
#include "config.h" #include "config.h"
#include "top.h"
#include <sys/utsname.h> #include <sys/utsname.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -644,27 +645,6 @@ struct obsd_sensors_struct obsd_sensors;
enum { PB_BATT_STATUS, PB_BATT_PERCENT, PB_BATT_TIME }; enum { PB_BATT_STATUS, PB_BATT_PERCENT, PB_BATT_TIME };
void get_powerbook_batt_info(char *, size_t, int); 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 { struct local_mail_s {
char *box; char *box;
int mail_count; int mail_count;

View File

@ -26,6 +26,9 @@
* *
* $Id$ */ * $Id$ */
#ifndef _top_h_
#define _top_h_
/* Ensure there's an operating system defined. /* Ensure there's an operating system defined.
* compile with gcc -DOS ... * compile with gcc -DOS ...
* There is *no* default because every OS has it's own way of revealing * There is *no* default because every OS has it's own way of revealing
@ -77,6 +80,28 @@
* Process class * * 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 {
struct sorted_process *greater; struct sorted_process *greater;
struct sorted_process *less; struct sorted_process *less;
@ -85,3 +110,5 @@ struct sorted_process {
/* Pointer to head of process list */ /* Pointer to head of process list */
void process_find_top(struct process **, struct process **); void process_find_top(struct process **, struct process **);
#endif /* _top_h_ */