Lines Matching refs:which
237 limit_value(int which, char *arg, rlim64_t *limit) in limit_value() argument
248 if (which == RLIMIT_CPU && strchr(arg, ':') != NULL) { in limit_value()
278 if (which == RLIMIT_CPU) in limit_value()
285 if (which == RLIMIT_CPU) in limit_value()
292 switch (which) { in limit_value()
316 parse_limits(int which, char *arg) in parse_limits() argument
321 struct rlimit64 *rp = &rlimit[which]; in parse_limits()
328 set_current[which] = FALSE; in parse_limits()
330 if (limit_value(which, soft, &rp->rlim_cur) != 0) in parse_limits()
332 set_current[which] = TRUE; in parse_limits()
337 set_maximum[which] = FALSE; in parse_limits()
339 if (limit_value(which, hard, &rp->rlim_max) != 0) in parse_limits()
341 set_maximum[which] = TRUE; in parse_limits()
343 if (set_current[which] && set_maximum[which] && in parse_limits()
470 set_one_limit(struct ps_prochandle *Pr, int which, rlim64_t cur, rlim64_t max) in set_one_limit() argument
478 if (pr_getrlimit64(Pr, which, &rlim) != 0) { in set_one_limit()
485 if (!set_current[which]) in set_one_limit()
487 if (!set_maximum[which]) in set_one_limit()
549 if (pr_setrlimit64(Pr, which, &rlim) != 0) { in set_one_limit()
591 int which; in set_limits() local
594 for (which = 0; which < RLIM_NLIMITS; which++) { in set_limits()
595 if (set_current[which] || set_maximum[which]) { in set_limits()
596 if (set_one_limit(Pr, which, rlimit[which].rlim_cur, in set_limits()
597 rlimit[which].rlim_max) != 0) in set_limits()