* Return a copy of the entire rlimit structure for the system limit * specified by 'which' in the rlimit structure pointed to by 'rlp'. */
| 1306 | * specified by 'which' in the rlimit structure pointed to by 'rlp'. |
| 1307 | */ |
| 1308 | void |
| 1309 | lim_rlimit(struct thread *td, int which, struct rlimit *rlp) |
| 1310 | { |
| 1311 | struct proc *p = td->td_proc; |
| 1312 | |
| 1313 | MPASS(td == curthread); |
| 1314 | KASSERT(which >= 0 && which < RLIM_NLIMITS, |
| 1315 | ("request for invalid resource limit")); |
| 1316 | *rlp = td->td_limit->pl_rlimit[which]; |
| 1317 | if (p->p_sysent->sv_fixlimit != NULL) |
| 1318 | p->p_sysent->sv_fixlimit(rlp, which); |
| 1319 | } |
| 1320 | |
| 1321 | void |
| 1322 | lim_rlimit_proc(struct proc *p, int which, struct rlimit *rlp) |
no outgoing calls
no test coverage detected