diff options
author | Martin Baulig <martin@src.gnome.org> | 1998-06-01 15:14:50 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1998-06-01 15:14:50 +0000 |
commit | b7be9a7141893692c456f6dd579effbc959d1d20 (patch) | |
tree | 333afbb075f6135ed0153456d9833cd2d29463cc /include | |
parent | 67798e0d7d631f030db33147ef06d986bba1a5bb (diff) | |
download | libgtop-b7be9a7141893692c456f6dd579effbc959d1d20.tar.gz |
added 'dummy' member so 'GLIBTOP_SYSDEPS_<feature>' now start with 1.
* include/glibtop/sysdeps.h: added 'dummy' member so
'GLIBTOP_SYSDEPS_<feature>' now start with 1.
* include/glibtop/*.h: we now #define 'glibtop_get_<feature>'
as 'glibtop_get_<feature>__l' and 'glibtop_get_<feature>__r'
either as the '__p' or the '__s' function.
Diffstat (limited to 'include')
-rw-r--r-- | include/glibtop/command.h | 39 | ||||
-rw-r--r-- | include/glibtop/cpu.h | 7 | ||||
-rw-r--r-- | include/glibtop/loadavg.h | 7 | ||||
-rw-r--r-- | include/glibtop/mem.h | 7 | ||||
-rw-r--r-- | include/glibtop/msg_limits.h | 7 | ||||
-rw-r--r-- | include/glibtop/open.h | 4 | ||||
-rw-r--r-- | include/glibtop/prockernel.h | 7 | ||||
-rw-r--r-- | include/glibtop/proclist.h | 7 | ||||
-rw-r--r-- | include/glibtop/procmem.h | 7 | ||||
-rw-r--r-- | include/glibtop/procsegment.h | 7 | ||||
-rw-r--r-- | include/glibtop/procsignal.h | 7 | ||||
-rw-r--r-- | include/glibtop/procstate.h | 7 | ||||
-rw-r--r-- | include/glibtop/proctime.h | 7 | ||||
-rw-r--r-- | include/glibtop/procuid.h | 7 | ||||
-rw-r--r-- | include/glibtop/sem_limits.h | 7 | ||||
-rw-r--r-- | include/glibtop/shm_limits.h | 7 | ||||
-rw-r--r-- | include/glibtop/swap.h | 7 | ||||
-rw-r--r-- | include/glibtop/sysdeps.h | 38 | ||||
-rw-r--r-- | include/glibtop/uptime.h | 7 |
19 files changed, 106 insertions, 87 deletions
diff --git a/include/glibtop/command.h b/include/glibtop/command.h index c57d2373..daf31227 100644 --- a/include/glibtop/command.h +++ b/include/glibtop/command.h @@ -28,26 +28,25 @@ __BEGIN_DECLS #define GLIBTOP_CMND_QUIT 0 -#define GLIBTOP_CMND_SYSDEPS 1 -#define GLIBTOP_CMND_CPU 2 -#define GLIBTOP_CMND_MEM 3 -#define GLIBTOP_CMND_SWAP 4 -#define GLIBTOP_CMND_UPTIME 5 -#define GLIBTOP_CMND_LOADAVG 6 -#define GLIBTOP_CMND_SHM_LIMITS 7 -#define GLIBTOP_CMND_MSG_LIMITS 8 -#define GLIBTOP_CMND_SEM_LIMITS 9 -#define GLIBTOP_CMND_PROCLIST 10 - -#define GLIBTOP_CMND_PROC_STATE 11 -#define GLIBTOP_CMND_PROC_UID 12 -#define GLIBTOP_CMND_PROC_MEM 13 -#define GLIBTOP_CMND_PROC_TIME 14 -#define GLIBTOP_CMND_PROC_SIGNAL 15 -#define GLIBTOP_CMND_PROC_KERNEL 16 -#define GLIBTOP_CMND_PROC_SEGMENT 17 - -#define GLIBTOP_MAX_CMND 18 +#define GLIBTOP_CMND_CPU 1 +#define GLIBTOP_CMND_MEM 2 +#define GLIBTOP_CMND_SWAP 3 +#define GLIBTOP_CMND_UPTIME 4 +#define GLIBTOP_CMND_LOADAVG 5 +#define GLIBTOP_CMND_SHM_LIMITS 6 +#define GLIBTOP_CMND_MSG_LIMITS 7 +#define GLIBTOP_CMND_SEM_LIMITS 8 +#define GLIBTOP_CMND_PROCLIST 9 + +#define GLIBTOP_CMND_PROC_STATE 10 +#define GLIBTOP_CMND_PROC_UID 11 +#define GLIBTOP_CMND_PROC_MEM 12 +#define GLIBTOP_CMND_PROC_TIME 13 +#define GLIBTOP_CMND_PROC_SIGNAL 14 +#define GLIBTOP_CMND_PROC_KERNEL 15 +#define GLIBTOP_CMND_PROC_SEGMENT 16 + +#define GLIBTOP_MAX_CMND 17 typedef struct _glibtop_command glibtop_command; diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h index 80b04348..323fbbaf 100644 --- a/include/glibtop/cpu.h +++ b/include/glibtop/cpu.h @@ -49,16 +49,17 @@ struct _glibtop_cpu frequency; /* GLIBTOP_CPU_FREQUENCY */ }; -#define glibtop_get_cpu(cpu) glibtop_get_cpu__r(glibtop_global_server, cpu) +#define glibtop_get_cpu(cpu) glibtop_get_cpu__l(glibtop_global_server, cpu) #if GLIBTOP_SUID_CPU -#define glibtop_get_cpu__r glibtop_get_cpu__l +#define glibtop_get_cpu__r glibtop_get_cpu__p #else #define glibtop_get_cpu__r glibtop_get_cpu__s #endif -#if GLIBTOP_SUID_CPU extern void glibtop_get_cpu__l __P((glibtop *, glibtop_cpu *)); + +#if GLIBTOP_SUID_CPU extern void glibtop_get_cpu__p __P((glibtop *, glibtop_cpu *)); #else extern void glibtop_get_cpu__s __P((glibtop *, glibtop_cpu *)); diff --git a/include/glibtop/loadavg.h b/include/glibtop/loadavg.h index dd30d432..eaf6588c 100644 --- a/include/glibtop/loadavg.h +++ b/include/glibtop/loadavg.h @@ -39,16 +39,17 @@ struct _glibtop_loadavg double loadavg [3]; /* GLIBTOP_LOADAVG_LOADAVG */ }; -#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg__r(glibtop_global_server, loadavg) +#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg__l(glibtop_global_server, loadavg) #if GLIBTOP_SUID_LOADAVG -#define glibtop_get_loadavg__r glibtop_get_loadavg__l +#define glibtop_get_loadavg__r glibtop_get_loadavg__p #else #define glibtop_get_loadavg__r glibtop_get_loadavg__s #endif -#if GLIBTOP_SUID_LOADAVG extern void glibtop_get_loadavg__l __P((glibtop *, glibtop_loadavg *)); + +#if GLIBTOP_SUID_LOADAVG extern void glibtop_get_loadavg__p __P((glibtop *, glibtop_loadavg *)); #else extern void glibtop_get_loadavg__s __P((glibtop *, glibtop_loadavg *)); diff --git a/include/glibtop/mem.h b/include/glibtop/mem.h index 5b35344a..b36b626a 100644 --- a/include/glibtop/mem.h +++ b/include/glibtop/mem.h @@ -53,16 +53,17 @@ struct _glibtop_mem locked; /* GLIBTOP_MEM_LOCKED */ }; -#define glibtop_get_mem(mem) glibtop_get_mem__r(glibtop_global_server, mem) +#define glibtop_get_mem(mem) glibtop_get_mem__l(glibtop_global_server, mem) #if GLIBTOP_SUID_MEM -#define glibtop_get_mem__r glibtop_get_mem__l +#define glibtop_get_mem__r glibtop_get_mem__p #else #define glibtop_get_mem__r glibtop_get_mem__s #endif -#if GLIBTOP_SUID_MEM extern void glibtop_get_mem__l __P((glibtop *, glibtop_mem *)); + +#if GLIBTOP_SUID_MEM extern void glibtop_get_mem__p __P((glibtop *, glibtop_mem *)); #else extern void glibtop_get_mem__s __P((glibtop *, glibtop_mem *)); diff --git a/include/glibtop/msg_limits.h b/include/glibtop/msg_limits.h index 9031f549..648f0905 100644 --- a/include/glibtop/msg_limits.h +++ b/include/glibtop/msg_limits.h @@ -51,16 +51,17 @@ struct _glibtop_msg_limits msgtql; /* GLIBTOP_IPC_MSGTQL */ }; -#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits__r(glibtop_global_server, msg) +#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits__l(glibtop_global_server, msg) #if GLIBTOP_SUID_MSG_LIMITS -#define glibtop_get_msg_limits__r glibtop_get_msg_limits__l +#define glibtop_get_msg_limits__r glibtop_get_msg_limits__p #else #define glibtop_get_msg_limits__r glibtop_get_msg_limits__s #endif -#if GLIBTOP_SUID_MSG_LIMITS extern void glibtop_get_msg_limits__l __P((glibtop *, glibtop_msg_limits *)); + +#if GLIBTOP_SUID_MSG_LIMITS extern void glibtop_get_msg_limits__p __P((glibtop *, glibtop_msg_limits *)); #else extern void glibtop_get_msg_limits__s __P((glibtop *, glibtop_msg_limits *)); diff --git a/include/glibtop/open.h b/include/glibtop/open.h index 8be5a9ae..9a1dbe05 100644 --- a/include/glibtop/open.h +++ b/include/glibtop/open.h @@ -26,7 +26,9 @@ __BEGIN_DECLS -extern void glibtop_open __P((glibtop *, const char *)); +#define GLIBTOP_OPEN_IMMEDIATE 1 + +extern void glibtop_open __P((glibtop *, const char *, const unsigned long, const unsigned)); __END_DECLS diff --git a/include/glibtop/prockernel.h b/include/glibtop/prockernel.h index c214e0b2..3f035c31 100644 --- a/include/glibtop/prockernel.h +++ b/include/glibtop/prockernel.h @@ -60,16 +60,17 @@ struct _glibtop_proc_kernel * proc is sleeping in */ }; -#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel__r(glibtop_global_server, p1, p2) +#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel__l(glibtop_global_server, p1, p2) #if GLIBTOP_SUID_PROC_KERNEL -#define glibtop_get_proc_kernel__r glibtop_get_proc_kernel__l +#define glibtop_get_proc_kernel__r glibtop_get_proc_kernel__p #else #define glibtop_get_proc_kernel__r glibtop_get_proc_kernel__s #endif -#if GLIBTOP_SUID_PROC_KERNEL extern void glibtop_get_proc_kernel__l __P((glibtop *, glibtop_proc_kernel *, pid_t)); + +#if GLIBTOP_SUID_PROC_KERNEL extern void glibtop_get_proc_kernel__p __P((glibtop *, glibtop_proc_kernel *, pid_t)); #else extern void glibtop_get_proc_kernel__s __P((glibtop *, glibtop_proc_kernel *, pid_t)); diff --git a/include/glibtop/proclist.h b/include/glibtop/proclist.h index a55dd055..4d3dba24 100644 --- a/include/glibtop/proclist.h +++ b/include/glibtop/proclist.h @@ -43,16 +43,17 @@ struct _glibtop_proclist size; /* GLIBTOP_PROCLIST_SIZE */ }; -#define glibtop_get_proclist(proclist) glibtop_get_proclist__r(glibtop_global_server, proclist) +#define glibtop_get_proclist(proclist) glibtop_get_proclist__l(glibtop_global_server, proclist) #if GLIBTOP_SUID_PROCLIST -#define glibtop_get_proclist__r glibtop_get_proclist__l +#define glibtop_get_proclist__r glibtop_get_proclist__p #else #define glibtop_get_proclist__r glibtop_get_proclist__s #endif -#if GLIBTOP_SUID_PROCLIST extern unsigned *glibtop_get_proclist__l __P((glibtop *, glibtop_proclist *)); + +#if GLIBTOP_SUID_PROCLIST extern unsigned *glibtop_get_proclist__p __P((glibtop *, glibtop_proclist *)); #else extern unsigned *glibtop_get_proclist__s __P((glibtop *, glibtop_proclist *)); diff --git a/include/glibtop/procmem.h b/include/glibtop/procmem.h index d841add8..f8ae77b7 100644 --- a/include/glibtop/procmem.h +++ b/include/glibtop/procmem.h @@ -53,16 +53,17 @@ struct _glibtop_proc_mem * of the process; usually 2,147,483,647 */ }; -#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem__r(glibtop_global_server, p1, p2) +#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem__l(glibtop_global_server, p1, p2) #if GLIBTOP_SUID_PROC_MEM -#define glibtop_get_proc_mem__r glibtop_get_proc_mem__l +#define glibtop_get_proc_mem__r glibtop_get_proc_mem__p #else #define glibtop_get_proc_mem__r glibtop_get_proc_mem__s #endif -#if GLIBTOP_SUID_PROC_MEM extern void glibtop_get_proc_mem__l __P((glibtop *, glibtop_proc_mem *, pid_t)); + +#if GLIBTOP_SUID_PROC_MEM extern void glibtop_get_proc_mem__p __P((glibtop *, glibtop_proc_mem *, pid_t)); #else extern void glibtop_get_proc_mem__s __P((glibtop *, glibtop_proc_mem *, pid_t)); diff --git a/include/glibtop/procsegment.h b/include/glibtop/procsegment.h index 7b8b4425..574b60b3 100644 --- a/include/glibtop/procsegment.h +++ b/include/glibtop/procsegment.h @@ -54,16 +54,17 @@ struct _glibtop_proc_segment start_stack; /* address of the bottom of stack segment */ }; -#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment__r(glibtop_global_server, p1, p2) +#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment__l(glibtop_global_server, p1, p2) #if GLIBTOP_SUID_PROC_SEGMENT -#define glibtop_get_proc_segment__r glibtop_get_proc_segment__l +#define glibtop_get_proc_segment__r glibtop_get_proc_segment__p #else #define glibtop_get_proc_segment__r glibtop_get_proc_segment__s #endif -#if GLIBTOP_SUID_PROC_SEGMENT extern void glibtop_get_proc_segment__l __P((glibtop *, glibtop_proc_segment *, pid_t)); + +#if GLIBTOP_SUID_PROC_SEGMENT extern void glibtop_get_proc_segment__p __P((glibtop *, glibtop_proc_segment *, pid_t)); #else extern void glibtop_get_proc_segment__s __P((glibtop *, glibtop_proc_segment *, pid_t)); diff --git a/include/glibtop/procsignal.h b/include/glibtop/procsignal.h index dc77a7e3..c7257c9a 100644 --- a/include/glibtop/procsignal.h +++ b/include/glibtop/procsignal.h @@ -47,16 +47,17 @@ struct _glibtop_proc_signal sigcatch; /* mask of caught signals */ }; -#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal__r(glibtop_global_server, p1, p2) +#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal__l(glibtop_global_server, p1, p2) #if GLIBTOP_SUID_PROC_SIGNAL -#define glibtop_get_proc_signal__r glibtop_get_proc_signal__l +#define glibtop_get_proc_signal__r glibtop_get_proc_signal__p #else #define glibtop_get_proc_signal__r glibtop_get_proc_signal__s #endif -#if GLIBTOP_SUID_PROC_SIGNAL extern void glibtop_get_proc_signal__l __P((glibtop *, glibtop_proc_signal *, pid_t)); + +#if GLIBTOP_SUID_PROC_SIGNAL extern void glibtop_get_proc_signal__p __P((glibtop *, glibtop_proc_signal *, pid_t)); #else extern void glibtop_get_proc_signal__s __P((glibtop *, glibtop_proc_signal *, pid_t)); diff --git a/include/glibtop/procstate.h b/include/glibtop/procstate.h index f5044eb9..7217b6b2 100644 --- a/include/glibtop/procstate.h +++ b/include/glibtop/procstate.h @@ -54,16 +54,17 @@ struct _glibtop_proc_state gid; /* GID of process */ }; -#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state__r(glibtop_global_server, p1, p2) +#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state__l(glibtop_global_server, p1, p2) #if GLIBTOP_SUID_PROC_STATE -#define glibtop_get_proc_state__r glibtop_get_proc_state__l +#define glibtop_get_proc_state__r glibtop_get_proc_state__p #else #define glibtop_get_proc_state__r glibtop_get_proc_state__s #endif -#if GLIBTOP_SUID_PROC_STATE extern void glibtop_get_proc_state__l __P((glibtop *, glibtop_proc_state *, pid_t)); + +#if GLIBTOP_SUID_PROC_STATE extern void glibtop_get_proc_state__p __P((glibtop *, glibtop_proc_state *, pid_t)); #else extern void glibtop_get_proc_state__s __P((glibtop *, glibtop_proc_state *, pid_t)); diff --git a/include/glibtop/proctime.h b/include/glibtop/proctime.h index 1d866767..245afc6e 100644 --- a/include/glibtop/proctime.h +++ b/include/glibtop/proctime.h @@ -59,16 +59,17 @@ struct _glibtop_proc_time * due to an interval timer. */ }; -#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time__r(glibtop_global_server, p1, p2) +#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time__l(glibtop_global_server, p1, p2) #if GLIBTOP_SUID_PROC_TIME -#define glibtop_get_proc_time__r glibtop_get_proc_time__l +#define glibtop_get_proc_time__r glibtop_get_proc_time__p #else #define glibtop_get_proc_time__r glibtop_get_proc_time__s #endif -#if GLIBTOP_SUID_PROC_TIME extern void glibtop_get_proc_time__l __P((glibtop *, glibtop_proc_time *, pid_t)); + +#if GLIBTOP_SUID_PROC_TIME extern void glibtop_get_proc_time__p __P((glibtop *, glibtop_proc_time *, pid_t)); #else extern void glibtop_get_proc_time__s __P((glibtop *, glibtop_proc_time *, pid_t)); diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h index 3d8682bc..40de660e 100644 --- a/include/glibtop/procuid.h +++ b/include/glibtop/procuid.h @@ -63,16 +63,17 @@ struct _glibtop_proc_uid nice; /* standard unix nice level of process */ }; -#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid__r(glibtop_global_server, p1, p2) +#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid__l(glibtop_global_server, p1, p2) #if GLIBTOP_SUID_PROC_UID -#define glibtop_get_proc_uid__r glibtop_get_proc_uid__l +#define glibtop_get_proc_uid__r glibtop_get_proc_uid__p #else #define glibtop_get_proc_uid__r glibtop_get_proc_uid__s #endif -#if GLIBTOP_SUID_PROC_UID extern void glibtop_get_proc_uid__l __P((glibtop *, glibtop_proc_uid *, pid_t)); + +#if GLIBTOP_SUID_PROC_UID extern void glibtop_get_proc_uid__p __P((glibtop *, glibtop_proc_uid *, pid_t)); #else extern void glibtop_get_proc_uid__s __P((glibtop *, glibtop_proc_uid *, pid_t)); diff --git a/include/glibtop/sem_limits.h b/include/glibtop/sem_limits.h index f24460e2..8a591a68 100644 --- a/include/glibtop/sem_limits.h +++ b/include/glibtop/sem_limits.h @@ -57,16 +57,17 @@ struct _glibtop_sem_limits semaem; /* GLIBTOP_IPC_SEMAEM */ }; -#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits__r(glibtop_global_server, sem) +#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits__l(glibtop_global_server, sem) #if GLIBTOP_SUID_SEM_LIMITS -#define glibtop_get_sem_limits__r glibtop_get_sem_limits__l +#define glibtop_get_sem_limits__r glibtop_get_sem_limits__p #else #define glibtop_get_sem_limits__r glibtop_get_sem_limits__s #endif -#if GLIBTOP_SUID_SEM_LIMITS extern void glibtop_get_sem_limits__l __P((glibtop *, glibtop_sem_limits *)); + +#if GLIBTOP_SUID_SEM_LIMITS extern void glibtop_get_sem_limits__p __P((glibtop *, glibtop_sem_limits *)); #else extern void glibtop_get_sem_limits__s __P((glibtop *, glibtop_sem_limits *)); diff --git a/include/glibtop/shm_limits.h b/include/glibtop/shm_limits.h index 30fc3e4f..8d996e27 100644 --- a/include/glibtop/shm_limits.h +++ b/include/glibtop/shm_limits.h @@ -47,16 +47,17 @@ struct _glibtop_shm_limits shmall; /* GLIBTOP_IPC_SHMALL */ }; -#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits__r(glibtop_global_server, shm) +#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits__l(glibtop_global_server, shm) #if GLIBTOP_SUID_SHM_LIMITS -#define glibtop_get_shm_limits__r glibtop_get_shm_limits__l +#define glibtop_get_shm_limits__r glibtop_get_shm_limits__p #else #define glibtop_get_shm_limits__r glibtop_get_shm_limits__s #endif -#if GLIBTOP_SUID_SHM_LIMITS extern void glibtop_get_shm_limits__l __P((glibtop *, glibtop_shm_limits *)); + +#if GLIBTOP_SUID_SHM_LIMITS extern void glibtop_get_shm_limits__p __P((glibtop *, glibtop_shm_limits *)); #else extern void glibtop_get_shm_limits__s __P((glibtop *, glibtop_shm_limits *)); diff --git a/include/glibtop/swap.h b/include/glibtop/swap.h index fb438413..4ee5564d 100644 --- a/include/glibtop/swap.h +++ b/include/glibtop/swap.h @@ -43,16 +43,17 @@ struct _glibtop_swap free; /* GLIBTOP_SWAP_FREE */ }; -#define glibtop_get_swap(swap) glibtop_get_swap__r(glibtop_global_server, swap) +#define glibtop_get_swap(swap) glibtop_get_swap__l(glibtop_global_server, swap) #if GLIBTOP_SUID_SWAP -#define glibtop_get_swap__r glibtop_get_swap__l +#define glibtop_get_swap__r glibtop_get_swap__p #else #define glibtop_get_swap__r glibtop_get_swap__s #endif -#if GLIBTOP_SUID_SWAP extern void glibtop_get_swap__l __P((glibtop *, glibtop_swap *)); + +#if GLIBTOP_SUID_SWAP extern void glibtop_get_swap__p __P((glibtop *, glibtop_swap *)); #else extern void glibtop_get_swap__s __P((glibtop *, glibtop_swap *)); diff --git a/include/glibtop/sysdeps.h b/include/glibtop/sysdeps.h index b7eec5cb..b8dd8f98 100644 --- a/include/glibtop/sysdeps.h +++ b/include/glibtop/sysdeps.h @@ -27,30 +27,32 @@ __BEGIN_DECLS -#define GLIBTOP_SYSDEPS_CPU 0 -#define GLIBTOP_SYSDEPS_MEM 1 -#define GLIBTOP_SYSDEPS_SWAP 2 -#define GLIBTOP_SYSDEPS_UPTIME 3 -#define GLIBTOP_SYSDEPS_LOADAVG 4 -#define GLIBTOP_SYSDEPS_SHM_LIMITS 5 -#define GLIBTOP_SYSDEPS_MSG_LIMITS 6 -#define GLIBTOP_SYSDEPS_SEM_LIMITS 7 -#define GLIBTOP_SYSDEPS_PROCLIST 8 -#define GLIBTOP_SYSDEPS_PROC_STATE 9 -#define GLIBTOP_SYSDEPS_PROC_UID 10 -#define GLIBTOP_SYSDEPS_PROC_MEM 11 -#define GLIBTOP_SYSDEPS_PROC_TIME 12 -#define GLIBTOP_SYSDEPS_PROC_SIGNAL 13 -#define GLIBTOP_SYSDEPS_PROC_KERNEL 14 -#define GLIBTOP_SYSDEPS_PROC_SEGMENT 15 - -#define GLIBTOP_MAX_SYSDEPS 16 +#define GLIBTOP_SYSDEPS_DUMMY 0 +#define GLIBTOP_SYSDEPS_CPU 1 +#define GLIBTOP_SYSDEPS_MEM 2 +#define GLIBTOP_SYSDEPS_SWAP 3 +#define GLIBTOP_SYSDEPS_UPTIME 4 +#define GLIBTOP_SYSDEPS_LOADAVG 5 +#define GLIBTOP_SYSDEPS_SHM_LIMITS 6 +#define GLIBTOP_SYSDEPS_MSG_LIMITS 7 +#define GLIBTOP_SYSDEPS_SEM_LIMITS 8 +#define GLIBTOP_SYSDEPS_PROCLIST 9 +#define GLIBTOP_SYSDEPS_PROC_STATE 10 +#define GLIBTOP_SYSDEPS_PROC_UID 11 +#define GLIBTOP_SYSDEPS_PROC_MEM 12 +#define GLIBTOP_SYSDEPS_PROC_TIME 13 +#define GLIBTOP_SYSDEPS_PROC_SIGNAL 14 +#define GLIBTOP_SYSDEPS_PROC_KERNEL 15 +#define GLIBTOP_SYSDEPS_PROC_SEGMENT 16 + +#define GLIBTOP_MAX_SYSDEPS 17 typedef struct _glibtop_sysdeps glibtop_sysdeps; struct _glibtop_sysdeps { unsigned long flags, + dummy, /* dummy field */ cpu, /* glibtop_cpu */ mem, /* glibtop_mem */ swap, /* glibtop_swap */ diff --git a/include/glibtop/uptime.h b/include/glibtop/uptime.h index 50dfdb48..aa3be951 100644 --- a/include/glibtop/uptime.h +++ b/include/glibtop/uptime.h @@ -41,16 +41,17 @@ struct _glibtop_uptime idletime; /* GLIBTOP_UPTIME_IDLETIME */ }; -#define glibtop_get_uptime(uptime) glibtop_get_uptime__r(glibtop_global_server, uptime) +#define glibtop_get_uptime(uptime) glibtop_get_uptime__l(glibtop_global_server, uptime) #if GLIBTOP_SUID_UPTIME -#define glibtop_get_uptime__r glibtop_get_uptime__l +#define glibtop_get_uptime__r glibtop_get_uptime__p #else #define glibtop_get_uptime__r glibtop_get_uptime__s #endif -#if GLIBTOP_SUID_UPTIME extern void glibtop_get_uptime__l __P((glibtop *, glibtop_uptime *)); + +#if GLIBTOP_SUID_UPTIME extern void glibtop_get_uptime__p __P((glibtop *, glibtop_uptime *)); #else extern void glibtop_get_uptime__s __P((glibtop *, glibtop_uptime *)); |