• Home
  • Raw
  • Download

Lines Matching refs:r

1437 	struct rlimit r;  in COMPAT_SYSCALL_DEFINE2()  local
1444 r.rlim_cur = RLIM_INFINITY; in COMPAT_SYSCALL_DEFINE2()
1446 r.rlim_cur = r32.rlim_cur; in COMPAT_SYSCALL_DEFINE2()
1448 r.rlim_max = RLIM_INFINITY; in COMPAT_SYSCALL_DEFINE2()
1450 r.rlim_max = r32.rlim_max; in COMPAT_SYSCALL_DEFINE2()
1451 return do_prlimit(current, resource, &r, NULL); in COMPAT_SYSCALL_DEFINE2()
1457 struct rlimit r; in COMPAT_SYSCALL_DEFINE2() local
1460 ret = do_prlimit(current, resource, NULL, &r); in COMPAT_SYSCALL_DEFINE2()
1463 if (r.rlim_cur > COMPAT_RLIM_INFINITY) in COMPAT_SYSCALL_DEFINE2()
1466 r32.rlim_cur = r.rlim_cur; in COMPAT_SYSCALL_DEFINE2()
1467 if (r.rlim_max > COMPAT_RLIM_INFINITY) in COMPAT_SYSCALL_DEFINE2()
1470 r32.rlim_max = r.rlim_max; in COMPAT_SYSCALL_DEFINE2()
1507 struct rlimit r; in COMPAT_SYSCALL_DEFINE2() local
1514 r = current->signal->rlim[resource]; in COMPAT_SYSCALL_DEFINE2()
1516 if (r.rlim_cur > 0x7FFFFFFF) in COMPAT_SYSCALL_DEFINE2()
1517 r.rlim_cur = 0x7FFFFFFF; in COMPAT_SYSCALL_DEFINE2()
1518 if (r.rlim_max > 0x7FFFFFFF) in COMPAT_SYSCALL_DEFINE2()
1519 r.rlim_max = 0x7FFFFFFF; in COMPAT_SYSCALL_DEFINE2()
1521 if (put_user(r.rlim_cur, &rlim->rlim_cur) || in COMPAT_SYSCALL_DEFINE2()
1522 put_user(r.rlim_max, &rlim->rlim_max)) in COMPAT_SYSCALL_DEFINE2()
1734 static void accumulate_thread_rusage(struct task_struct *t, struct rusage *r) in accumulate_thread_rusage() argument
1736 r->ru_nvcsw += t->nvcsw; in accumulate_thread_rusage()
1737 r->ru_nivcsw += t->nivcsw; in accumulate_thread_rusage()
1738 r->ru_minflt += t->min_flt; in accumulate_thread_rusage()
1739 r->ru_majflt += t->maj_flt; in accumulate_thread_rusage()
1740 r->ru_inblock += task_io_get_inblock(t); in accumulate_thread_rusage()
1741 r->ru_oublock += task_io_get_oublock(t); in accumulate_thread_rusage()
1744 void getrusage(struct task_struct *p, int who, struct rusage *r) in getrusage() argument
1755 memset(r, 0, sizeof(*r)); in getrusage()
1761 accumulate_thread_rusage(p, r); in getrusage()
1773 r->ru_nvcsw = sig->cnvcsw; in getrusage()
1774 r->ru_nivcsw = sig->cnivcsw; in getrusage()
1775 r->ru_minflt = sig->cmin_flt; in getrusage()
1776 r->ru_majflt = sig->cmaj_flt; in getrusage()
1777 r->ru_inblock = sig->cinblock; in getrusage()
1778 r->ru_oublock = sig->coublock; in getrusage()
1786 r->ru_nvcsw += sig->nvcsw; in getrusage()
1787 r->ru_nivcsw += sig->nivcsw; in getrusage()
1788 r->ru_minflt += sig->min_flt; in getrusage()
1789 r->ru_majflt += sig->maj_flt; in getrusage()
1790 r->ru_inblock += sig->inblock; in getrusage()
1791 r->ru_oublock += sig->oublock; in getrusage()
1797 accumulate_thread_rusage(t, r); in getrusage()
1827 r->ru_maxrss = maxrss * (PAGE_SIZE / 1024); /* convert pages to KBs */ in getrusage()
1828 r->ru_utime = ns_to_kernel_old_timeval(utime); in getrusage()
1829 r->ru_stime = ns_to_kernel_old_timeval(stime); in getrusage()
1834 struct rusage r; in SYSCALL_DEFINE2() local
1840 getrusage(current, who, &r); in SYSCALL_DEFINE2()
1841 return copy_to_user(ru, &r, sizeof(r)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1847 struct rusage r; in COMPAT_SYSCALL_DEFINE2() local
1853 getrusage(current, who, &r); in COMPAT_SYSCALL_DEFINE2()
1854 return put_compat_rusage(&r, ru); in COMPAT_SYSCALL_DEFINE2()