[BACK]Return to machine.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / top

Diff for /src/usr.bin/top/machine.c between version 1.32 and 1.33

version 1.32, 2003/06/14 20:23:41 version 1.33, 2003/06/15 16:24:44
Line 144 
Line 144 
 /* define pagetok in terms of pageshift */  /* define pagetok in terms of pageshift */
 #define pagetok(size) ((size) << pageshift)  #define pagetok(size) ((size) << pageshift)
   
 int             maxslp;  unsigned int    maxslp;
   
 int  int
 getstathz(void)  getstathz(void)
Line 311 
Line 311 
 get_process_info(struct system_info *si, struct process_select *sel,  get_process_info(struct system_info *si, struct process_select *sel,
     int (*compare) (const void *, const void *))      int (*compare) (const void *, const void *))
 {  {
         int show_idle, show_system, show_uid, show_command;          int show_idle, show_system, show_uid;
         int total_procs, active_procs, i;          int total_procs, active_procs, i;
         struct kinfo_proc **prefp, *pp;          struct kinfo_proc **prefp, *pp;
   
Line 332 
Line 332 
         /* set up flags which define what we are going to select */          /* set up flags which define what we are going to select */
         show_idle = sel->idle;          show_idle = sel->idle;
         show_system = sel->system;          show_system = sel->system;
         show_uid = sel->uid != -1;          show_uid = sel->uid != (uid_t)-1;
   
         /* count up process states and get pointers to interesting procs */          /* count up process states and get pointers to interesting procs */
         total_procs = 0;          total_procs = 0;
Line 353 
Line 353 
                         if ((PP(pp, p_stat) != SZOMB) &&                          if ((PP(pp, p_stat) != SZOMB) &&
                             (show_idle || (PP(pp, p_pctcpu) != 0) ||                              (show_idle || (PP(pp, p_pctcpu) != 0) ||
                             (PP(pp, p_stat) == SRUN)) &&                              (PP(pp, p_stat) == SRUN)) &&
                             (!show_uid || EP(pp, e_pcred.p_ruid) == (uid_t) sel->uid)) {                              (!show_uid || EP(pp, e_pcred.p_ruid) == sel->uid)) {
                                 *prefp++ = pp;                                  *prefp++ = pp;
                                 active_procs++;                                  active_procs++;
                         }                          }
Line 610 
Line 610 
  *              security problem.  It validates requests for the "kill"   *              security problem.  It validates requests for the "kill"
  *              and "renice" commands.   *              and "renice" commands.
  */   */
 int  uid_t
 proc_owner(pid_t pid)  proc_owner(pid_t pid)
 {  {
         struct kinfo_proc **prefp, *pp;          struct kinfo_proc **prefp, *pp;

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33