diff --git a/ChangeLog b/ChangeLog index 82788719..f4b6487a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-05-08 Martin Baulig + + * include/glibtop/limits.h (GLIBTOP_MAX_GROUPS): Define this here. + * include/glibtop/procuid.h (GLIBTOP_MAX_GROUPS): Moved to limits.h. + + * features.def: We can use constants from here. + 1999-05-08 Martin Baulig * libgtop-sysdeps.m4: Use the setgid sys server for Solaris. diff --git a/features.def b/features.def index b5b110b3..a5530048 100644 --- a/features.def +++ b/features.def @@ -1,4 +1,4 @@ -void|cpu|ulong(total,user,nice,sys,idle,frequency,xcpu_total[256],xcpu_user[256],xcpu_nice[256],xcpu_sys[256],xcpu_idle[256],xcpu_flags) +void|cpu|ulong(total,user,nice,sys,idle,frequency,xcpu_total[GLIBTOP_NCPU],xcpu_user[GLIBTOP_NCPU],xcpu_nice[GLIBTOP_NCPU],xcpu_sys[GLIBTOP_NCPU],xcpu_idle[GLIBTOP_NCPU],xcpu_flags) void|mem|ulong(total,used,free,shared,buffer,cached,user,locked) void|swap|ulong(total,used,free,pagein,pageout) void|uptime|double(uptime,idletime):ulong(boot_time) @@ -8,9 +8,9 @@ void|msg_limits|ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql) void|sem_limits|ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem) unsigned *|proclist|ulong(number,size,total)|long(which,arg) void|proc_state|str(cmd):unsigned(state):ulong(uid,gid,ruid,rgid,has_cpu,processor,last_processor)|pid_t(pid) -void|proc_uid|long(uid,euid,gid,egid,suid,sgid,fsuid,fsgid,pid,ppid,pgrp,session,tty,tpgid,priority,nice,ngroups,groups[32])|pid_t(pid) +void|proc_uid|long(uid,euid,gid,egid,suid,sgid,fsuid,fsgid,pid,ppid,pgrp,session,tty,tpgid,priority,nice,ngroups,groups[GLIBTOP_MAX_GROUPS])|pid_t(pid) void|proc_mem|long(size,vsize,resident,share,rss,rss_rlim)|pid_t(pid) -void|proc_time|long(start_time,rtime,utime,stime,cutime,cstime,timeout,it_real_value,frequency,xcpu_utime[256],xcpu_stime[256],xcpu_flags)|pid_t(pid) +void|proc_time|long(start_time,rtime,utime,stime,cutime,cstime,timeout,it_real_value,frequency,xcpu_utime[GLIBTOP_NCPU],xcpu_stime[GLIBTOP_NCPU],xcpu_flags)|pid_t(pid) void|proc_signal|ulong(signal[2],blocked[2],sigignore[2],sigcatch[2])|pid_t(pid) void|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,nwchan):str(wchan)|pid_t(pid) void|proc_segment|ulong(text_rss,shlib_rss,data_rss,stack_rss,dirty_size,start_code,end_code,start_data,end_data,start_brk,end_brk,start_stack,start_mmap,arg_start,arg_end,env_start,env_end)|pid_t(pid) diff --git a/include/glibtop/limits.h b/include/glibtop/limits.h index 7f878333..b07d5f23 100644 --- a/include/glibtop/limits.h +++ b/include/glibtop/limits.h @@ -33,6 +33,9 @@ BEGIN_LIBGTOP_DECLS /* Nobody should really be using more than 64 processors. */ #define GLIBTOP_NCPU 64 +/* Maximum number of process groups in glibtop_proc_uid. */ +#define GLIBTOP_MAX_GROUPS 32 + END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h index 88626a11..36906de2 100644 --- a/include/glibtop/procuid.h +++ b/include/glibtop/procuid.h @@ -52,8 +52,6 @@ BEGIN_LIBGTOP_DECLS #define GLIBTOP_MAX_PROC_UID 18 -#define GLIBTOP_MAX_GROUPS 32 - typedef struct _glibtop_proc_uid glibtop_proc_uid; /* User, Group, Terminal and session */