[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.75 and 1.76

version 1.75, 2012/12/18 21:28:45 version 1.76, 2013/03/23 21:12:32
Line 464 
Line 464 
 char *  char *
 format_next_process(caddr_t handle, char *(*get_userid)(uid_t), pid_t *pid)  format_next_process(caddr_t handle, char *(*get_userid)(uid_t), pid_t *pid)
 {  {
         char *p_wait, waddr[sizeof(void *) * 2 + 3];    /* Hexify void pointer */          char *p_wait;
         struct kinfo_proc *pp;          struct kinfo_proc *pp;
         struct handle *hp;          struct handle *hp;
         int cputime;          int cputime;
Line 480 
Line 480 
         /* calculate the base for cpu percentages */          /* calculate the base for cpu percentages */
         pct = pctdouble(pp->p_pctcpu);          pct = pctdouble(pp->p_pctcpu);
   
         if (pp->p_wchan) {          if (pp->p_wmesg[0])
                 if (pp->p_wmesg)                  p_wait = pp->p_wmesg;
                         p_wait = pp->p_wmesg;          else
                 else {  
                         snprintf(waddr, sizeof(waddr), "%llx",  
                             (unsigned long long)pp->p_wchan);  
                         p_wait = waddr;  
                 }  
         } else  
                 p_wait = "-";                  p_wait = "-";
   
         /* format this entry */          /* format this entry */

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.76