Lines Matching refs:r
1402 struct rlimit r; in COMPAT_SYSCALL_DEFINE2() local
1409 r.rlim_cur = RLIM_INFINITY; in COMPAT_SYSCALL_DEFINE2()
1411 r.rlim_cur = r32.rlim_cur; in COMPAT_SYSCALL_DEFINE2()
1413 r.rlim_max = RLIM_INFINITY; in COMPAT_SYSCALL_DEFINE2()
1415 r.rlim_max = r32.rlim_max; in COMPAT_SYSCALL_DEFINE2()
1416 return do_prlimit(current, resource, &r, NULL); in COMPAT_SYSCALL_DEFINE2()
1422 struct rlimit r; in COMPAT_SYSCALL_DEFINE2() local
1425 ret = do_prlimit(current, resource, NULL, &r); in COMPAT_SYSCALL_DEFINE2()
1428 if (r.rlim_cur > COMPAT_RLIM_INFINITY) in COMPAT_SYSCALL_DEFINE2()
1431 r32.rlim_cur = r.rlim_cur; in COMPAT_SYSCALL_DEFINE2()
1432 if (r.rlim_max > COMPAT_RLIM_INFINITY) in COMPAT_SYSCALL_DEFINE2()
1435 r32.rlim_max = r.rlim_max; in COMPAT_SYSCALL_DEFINE2()
1472 struct rlimit r; in COMPAT_SYSCALL_DEFINE2() local
1479 r = current->signal->rlim[resource]; in COMPAT_SYSCALL_DEFINE2()
1481 if (r.rlim_cur > 0x7FFFFFFF) in COMPAT_SYSCALL_DEFINE2()
1482 r.rlim_cur = 0x7FFFFFFF; in COMPAT_SYSCALL_DEFINE2()
1483 if (r.rlim_max > 0x7FFFFFFF) in COMPAT_SYSCALL_DEFINE2()
1484 r.rlim_max = 0x7FFFFFFF; in COMPAT_SYSCALL_DEFINE2()
1486 if (put_user(r.rlim_cur, &rlim->rlim_cur) || in COMPAT_SYSCALL_DEFINE2()
1487 put_user(r.rlim_max, &rlim->rlim_max)) in COMPAT_SYSCALL_DEFINE2()
1697 static void accumulate_thread_rusage(struct task_struct *t, struct rusage *r) in accumulate_thread_rusage() argument
1699 r->ru_nvcsw += t->nvcsw; in accumulate_thread_rusage()
1700 r->ru_nivcsw += t->nivcsw; in accumulate_thread_rusage()
1701 r->ru_minflt += t->min_flt; in accumulate_thread_rusage()
1702 r->ru_majflt += t->maj_flt; in accumulate_thread_rusage()
1703 r->ru_inblock += task_io_get_inblock(t); in accumulate_thread_rusage()
1704 r->ru_oublock += task_io_get_oublock(t); in accumulate_thread_rusage()
1707 void getrusage(struct task_struct *p, int who, struct rusage *r) in getrusage() argument
1714 memset((char *)r, 0, sizeof (*r)); in getrusage()
1719 accumulate_thread_rusage(p, r); in getrusage()
1732 r->ru_nvcsw = p->signal->cnvcsw; in getrusage()
1733 r->ru_nivcsw = p->signal->cnivcsw; in getrusage()
1734 r->ru_minflt = p->signal->cmin_flt; in getrusage()
1735 r->ru_majflt = p->signal->cmaj_flt; in getrusage()
1736 r->ru_inblock = p->signal->cinblock; in getrusage()
1737 r->ru_oublock = p->signal->coublock; in getrusage()
1748 r->ru_nvcsw += p->signal->nvcsw; in getrusage()
1749 r->ru_nivcsw += p->signal->nivcsw; in getrusage()
1750 r->ru_minflt += p->signal->min_flt; in getrusage()
1751 r->ru_majflt += p->signal->maj_flt; in getrusage()
1752 r->ru_inblock += p->signal->inblock; in getrusage()
1753 r->ru_oublock += p->signal->oublock; in getrusage()
1758 accumulate_thread_rusage(t, r); in getrusage()
1768 r->ru_utime = ns_to_timeval(utime); in getrusage()
1769 r->ru_stime = ns_to_timeval(stime); in getrusage()
1779 r->ru_maxrss = maxrss * (PAGE_SIZE / 1024); /* convert pages to KBs */ in getrusage()
1784 struct rusage r; in SYSCALL_DEFINE2() local
1790 getrusage(current, who, &r); in SYSCALL_DEFINE2()
1791 return copy_to_user(ru, &r, sizeof(r)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1797 struct rusage r; in COMPAT_SYSCALL_DEFINE2() local
1803 getrusage(current, who, &r); in COMPAT_SYSCALL_DEFINE2()
1804 return put_compat_rusage(&r, ru); in COMPAT_SYSCALL_DEFINE2()