added some new function suffixes: '__l' is a function defined in the
* sysdeps/linux/*.h: added some new function suffixes: '__l' is a function defined in the client part; '__s' is a function defined in the sysdeps part and '__p' is a function that needs special priviledges. '__r' is mapped either on '__l' or on '__s'. * sysdeps/linux/glibtop_server.h: New file - defines system dependent constants 'GLIBTOP_SUID_<feature>' being either 'GLIBTOP_SYSDEPS_<feature>'+1 depending upon whether or not this feature requires using the server. Things may now temporarily get instable; I'm currently implementing some suggestions Sebastian Wilhelmi has made.
This commit is contained in:
@@ -60,7 +60,8 @@ struct _glibtop_command
|
||||
|
||||
#define glibtop_call(p1, p2, p3, p4) glibtop_call__r(glibtop_global_server, p1, p2, p3, p4)
|
||||
|
||||
extern void *glibtop_call__r __P((glibtop *, unsigned, size_t, void *, size_t, void *));
|
||||
extern void *glibtop_call__l __P((glibtop *, unsigned, size_t, void *, size_t, void *));
|
||||
extern void *glibtop_call__s __P((glibtop *, unsigned, size_t, void *, size_t, void *));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
@@ -51,7 +51,18 @@ struct _glibtop_cpu
|
||||
|
||||
#define glibtop_get_cpu(cpu) glibtop_get_cpu__r(glibtop_global_server, cpu)
|
||||
|
||||
extern void glibtop_get_cpu__r __P((glibtop *, glibtop_cpu *));
|
||||
#if GLIBTOP_SUID_CPU
|
||||
#define glibtop_get_cpu__r glibtop_get_cpu__l
|
||||
#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 *));
|
||||
extern void glibtop_get_cpu__p __P((glibtop *, glibtop_cpu *));
|
||||
#else
|
||||
extern void glibtop_get_cpu__s __P((glibtop *, glibtop_cpu *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -41,7 +41,18 @@ struct _glibtop_loadavg
|
||||
|
||||
#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg__r(glibtop_global_server, loadavg)
|
||||
|
||||
extern void glibtop_get_loadavg__r __P((glibtop *, glibtop_loadavg *));
|
||||
#if GLIBTOP_SUID_LOADAVG
|
||||
#define glibtop_get_loadavg__r glibtop_get_loadavg__l
|
||||
#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 *));
|
||||
extern void glibtop_get_loadavg__p __P((glibtop *, glibtop_loadavg *));
|
||||
#else
|
||||
extern void glibtop_get_loadavg__s __P((glibtop *, glibtop_loadavg *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -55,7 +55,18 @@ struct _glibtop_mem
|
||||
|
||||
#define glibtop_get_mem(mem) glibtop_get_mem__r(glibtop_global_server, mem)
|
||||
|
||||
extern void glibtop_get_mem__r __P((glibtop *, glibtop_mem *));
|
||||
#if GLIBTOP_SUID_MEM
|
||||
#define glibtop_get_mem__r glibtop_get_mem__l
|
||||
#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 *));
|
||||
extern void glibtop_get_mem__p __P((glibtop *, glibtop_mem *));
|
||||
#else
|
||||
extern void glibtop_get_mem__s __P((glibtop *, glibtop_mem *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -53,7 +53,18 @@ struct _glibtop_msg_limits
|
||||
|
||||
#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits__r(glibtop_global_server, msg)
|
||||
|
||||
extern void glibtop_get_msg_limits__r __P((glibtop *, glibtop_msg_limits *));
|
||||
#if GLIBTOP_SUID_MSG_LIMITS
|
||||
#define glibtop_get_msg_limits__r glibtop_get_msg_limits__l
|
||||
#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 *));
|
||||
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 *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -62,7 +62,18 @@ struct _glibtop_proc_kernel
|
||||
|
||||
#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel__r(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_get_proc_kernel__r __P((glibtop *, glibtop_proc_kernel *, pid_t));
|
||||
#if GLIBTOP_SUID_PROC_KERNEL
|
||||
#define glibtop_get_proc_kernel__r glibtop_get_proc_kernel__l
|
||||
#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));
|
||||
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));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -45,7 +45,18 @@ struct _glibtop_proclist
|
||||
|
||||
#define glibtop_get_proclist(proclist) glibtop_get_proclist__r(glibtop_global_server, proclist)
|
||||
|
||||
extern unsigned *glibtop_get_proclist__r __P((glibtop *, glibtop_proclist *));
|
||||
#if GLIBTOP_SUID_PROCLIST
|
||||
#define glibtop_get_proclist__r glibtop_get_proclist__l
|
||||
#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 *));
|
||||
extern unsigned *glibtop_get_proclist__p __P((glibtop *, glibtop_proclist *));
|
||||
#else
|
||||
extern unsigned *glibtop_get_proclist__s __P((glibtop *, glibtop_proclist *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -55,7 +55,18 @@ struct _glibtop_proc_mem
|
||||
|
||||
#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem__r(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_get_proc_mem__r __P((glibtop *, glibtop_proc_mem *, pid_t));
|
||||
#if GLIBTOP_SUID_PROC_MEM
|
||||
#define glibtop_get_proc_mem__r glibtop_get_proc_mem__l
|
||||
#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));
|
||||
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));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -56,7 +56,18 @@ struct _glibtop_proc_segment
|
||||
|
||||
#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment__r(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_get_proc_segment__r __P((glibtop *, glibtop_proc_segment *, pid_t));
|
||||
#if GLIBTOP_SUID_PROC_SEGMENT
|
||||
#define glibtop_get_proc_segment__r glibtop_get_proc_segment__l
|
||||
#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));
|
||||
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));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -49,7 +49,18 @@ struct _glibtop_proc_signal
|
||||
|
||||
#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal__r(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_get_proc_signal__r __P((glibtop *, glibtop_proc_signal *, pid_t));
|
||||
#if GLIBTOP_SUID_PROC_SIGNAL
|
||||
#define glibtop_get_proc_signal__r glibtop_get_proc_signal__l
|
||||
#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));
|
||||
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));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -56,7 +56,18 @@ struct _glibtop_proc_state
|
||||
|
||||
#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state__r(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_get_proc_state__r __P((glibtop *, glibtop_proc_state *, pid_t));
|
||||
#if GLIBTOP_SUID_PROC_STATE
|
||||
#define glibtop_get_proc_state__r glibtop_get_proc_state__l
|
||||
#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));
|
||||
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));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -61,7 +61,18 @@ struct _glibtop_proc_time
|
||||
|
||||
#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time__r(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_get_proc_time__r __P((glibtop *, glibtop_proc_time *, pid_t));
|
||||
#if GLIBTOP_SUID_PROC_TIME
|
||||
#define glibtop_get_proc_time__r glibtop_get_proc_time__l
|
||||
#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));
|
||||
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));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -65,7 +65,18 @@ struct _glibtop_proc_uid
|
||||
|
||||
#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid__r(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_get_proc_uid__r __P((glibtop *, glibtop_proc_uid *, pid_t));
|
||||
#if GLIBTOP_SUID_PROC_UID
|
||||
#define glibtop_get_proc_uid__r glibtop_get_proc_uid__l
|
||||
#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));
|
||||
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));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -29,7 +29,8 @@ __BEGIN_DECLS
|
||||
|
||||
#define glibtop_read(p1, p2) glibtop_read(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_read__r __P((glibtop *, size_t, void *));
|
||||
extern void glibtop_read__l __P((glibtop *, size_t, void *));
|
||||
extern void glibtop_read__s __P((glibtop *, size_t, void *));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
@@ -29,7 +29,8 @@ __BEGIN_DECLS
|
||||
|
||||
#define glibtop_read_data() glibtop_read_data__r(glibtop_global_server)
|
||||
|
||||
extern void *glibtop_read_data__r __P((glibtop *));
|
||||
extern void *glibtop_read_data__l __P((glibtop *));
|
||||
extern void *glibtop_read_data__s __P((glibtop *));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
@@ -59,7 +59,18 @@ struct _glibtop_sem_limits
|
||||
|
||||
#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits__r(glibtop_global_server, sem)
|
||||
|
||||
extern void glibtop_get_sem_limits__r __P((glibtop *, glibtop_sem_limits *));
|
||||
#if GLIBTOP_SUID_SEM_LIMITS
|
||||
#define glibtop_get_sem_limits__r glibtop_get_sem_limits__l
|
||||
#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 *));
|
||||
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 *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -49,7 +49,18 @@ struct _glibtop_shm_limits
|
||||
|
||||
#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits__r(glibtop_global_server, shm)
|
||||
|
||||
extern void glibtop_get_shm_limits__r __P((glibtop *, glibtop_shm_limits *));
|
||||
#if GLIBTOP_SUID_SHM_LIMITS
|
||||
#define glibtop_get_shm_limits__r glibtop_get_shm_limits__l
|
||||
#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 *));
|
||||
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 *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -45,7 +45,18 @@ struct _glibtop_swap
|
||||
|
||||
#define glibtop_get_swap(swap) glibtop_get_swap__r(glibtop_global_server, swap)
|
||||
|
||||
extern void glibtop_get_swap__r __P((glibtop *, glibtop_swap *));
|
||||
#if GLIBTOP_SUID_SWAP
|
||||
#define glibtop_get_swap__r glibtop_get_swap__l
|
||||
#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 *));
|
||||
extern void glibtop_get_swap__p __P((glibtop *, glibtop_swap *));
|
||||
#else
|
||||
extern void glibtop_get_swap__s __P((glibtop *, glibtop_swap *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -43,7 +43,18 @@ struct _glibtop_uptime
|
||||
|
||||
#define glibtop_get_uptime(uptime) glibtop_get_uptime__r(glibtop_global_server, uptime)
|
||||
|
||||
extern void glibtop_get_uptime__r __P((glibtop *, glibtop_uptime *));
|
||||
#if GLIBTOP_SUID_UPTIME
|
||||
#define glibtop_get_uptime__r glibtop_get_uptime__l
|
||||
#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 *));
|
||||
extern void glibtop_get_uptime__p __P((glibtop *, glibtop_uptime *));
|
||||
#else
|
||||
extern void glibtop_get_uptime__s __P((glibtop *, glibtop_uptime *));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
@@ -29,7 +29,8 @@ __BEGIN_DECLS
|
||||
|
||||
#define glibtop_write(p1, p2) glibtop_write(glibtop_global_server, p1, p2)
|
||||
|
||||
extern void glibtop_write__r __P((glibtop *, size_t, void *));
|
||||
extern void glibtop_write__l __P((glibtop *, size_t, void *));
|
||||
extern void glibtop_write__s __P((glibtop *, size_t, void *));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
Reference in New Issue
Block a user