Lines Matching refs:pru2
167 EXPORT void rusagesub __PR((struct rusage *pru1, struct rusage *pru2));
168 EXPORT void rusageadd __PR((struct rusage *pru1, struct rusage *pru2));
548 rusagesub(pru1, pru2) in rusagesub() argument
550 register struct rusage *pru2;
552 pru2->ru_utime.tv_sec -= pru1->ru_utime.tv_sec;
553 pru2->ru_utime.tv_usec -= pru1->ru_utime.tv_usec;
554 if (pru2->ru_utime.tv_usec < 0) {
555 pru2->ru_utime.tv_sec -= 1;
556 pru2->ru_utime.tv_usec += 1000000;
558 pru2->ru_stime.tv_sec -= pru1->ru_stime.tv_sec;
559 pru2->ru_stime.tv_usec -= pru1->ru_stime.tv_usec;
560 if (pru2->ru_stime.tv_usec < 0) {
561 pru2->ru_stime.tv_sec -= 1;
562 pru2->ru_stime.tv_usec += 1000000;
568 pru2->ru_maxrss -= pru1->ru_maxrss;
569 pru2->ru_ixrss -= pru1->ru_ixrss;
570 pru2->ru_idrss -= pru1->ru_idrss;
571 pru2->ru_isrss -= pru1->ru_isrss;
572 pru2->ru_inblock -= pru1->ru_inblock;
573 pru2->ru_oublock -= pru1->ru_oublock;
574 pru2->ru_majflt -= pru1->ru_majflt;
575 pru2->ru_nswap -= pru1->ru_nswap;
580 rusageadd(pru1, pru2) in rusageadd() argument
582 register struct rusage *pru2;
584 pru2->ru_utime.tv_sec += pru1->ru_utime.tv_sec;
585 pru2->ru_utime.tv_usec += pru1->ru_utime.tv_usec;
586 if (pru2->ru_utime.tv_usec >= 1000000) {
587 pru2->ru_utime.tv_sec += 1;
588 pru2->ru_utime.tv_usec -= 1000000;
590 pru2->ru_stime.tv_sec += pru1->ru_stime.tv_sec;
591 pru2->ru_stime.tv_usec += pru1->ru_stime.tv_usec;
592 if (pru2->ru_stime.tv_usec >= 1000000) {
593 pru2->ru_stime.tv_sec += 1;
594 pru2->ru_stime.tv_usec -= 1000000;
600 pru2->ru_maxrss += pru1->ru_maxrss;
601 pru2->ru_ixrss += pru1->ru_ixrss;
602 pru2->ru_idrss += pru1->ru_idrss;
603 pru2->ru_isrss += pru1->ru_isrss;
604 pru2->ru_inblock += pru1->ru_inblock;
605 pru2->ru_oublock += pru1->ru_oublock;
606 pru2->ru_majflt += pru1->ru_majflt;
607 pru2->ru_nswap += pru1->ru_nswap;