home *** CD-ROM | disk | FTP | other *** search
- *** pigs.c.orig Mon Jun 11 15:32:57 1990
- --- pigs.c Thu Jun 14 11:35:50 1990
- ***************
- *** 149,160 ****
- { "_proc" },
- #define X_NPROC 1
- { "_nproc" },
- ! #define X_USRPTMAP 2
- { "_Usrptmap" },
- ! #define X_USRPT 3
- { "_usrpt" },
- ! #define X_CPTIME 4
- ! { "_cp_time" },
- { "" }
- };
-
- --- 149,162 ----
- { "_proc" },
- #define X_NPROC 1
- { "_nproc" },
- ! #define X_CPTIME 2
- ! { "_cp_time" },
- ! #ifndef sun
- ! #define X_USRPTMAP 3
- { "_Usrptmap" },
- ! #define X_USRPT 4
- { "_usrpt" },
- ! # endif
- { "" }
- };
-
- ***************
- *** 174,183 ****
- --- 176,187 ----
- }
- if (kprocp == NULL)
- kprocp = (struct proc *)calloc(nproc, sizeof (struct proc));
- + # ifndef sun
- if (usrpt != NULL)
- return(1);
- usrpt = (struct pte *)nlst[X_USRPT].n_value;
- Usrptma = (struct pte *)nlst[X_USRPTMAP].n_value;
- + # endif
- if (pt == NULL)
- pt = (struct p_times *)calloc(nproc, sizeof (struct p_times));
- lseek(kmem, (long)nlst[X_CPTIME].n_value, L_SET);
- ***************
- *** 215,221 ****
- continue;
- prt->pt_pid = pp->p_pid;
- prt->pt_pp = pp;
- ! prt->pt_pctcpu = pp->p_pctcpu / (1.0 - exp(time * lccpu));
- prt->pt_uid = pp->p_uid;
- prt++;
- }
- --- 219,225 ----
- continue;
- prt->pt_pid = pp->p_pid;
- prt->pt_pp = pp;
- ! prt->pt_pctcpu = FSC(pp->p_pctcpu) / (1.0 - exp(time * lccpu));
- prt->pt_uid = pp->p_uid;
- prt++;
- }
-