| 2528 | } |
| 2529 | |
| 2530 | static void |
| 2531 | note_procstat_rlimit(void *arg, struct sbuf *sb, size_t *sizep) |
| 2532 | { |
| 2533 | struct proc *p; |
| 2534 | struct rlimit rlim[RLIM_NLIMITS]; |
| 2535 | size_t size; |
| 2536 | int structsize, i; |
| 2537 | |
| 2538 | p = (struct proc *)arg; |
| 2539 | size = sizeof(structsize) + sizeof(rlim); |
| 2540 | if (sb != NULL) { |
| 2541 | KASSERT(*sizep == size, ("invalid size")); |
| 2542 | structsize = sizeof(rlim); |
| 2543 | sbuf_bcat(sb, &structsize, sizeof(structsize)); |
| 2544 | PROC_LOCK(p); |
| 2545 | for (i = 0; i < RLIM_NLIMITS; i++) |
| 2546 | lim_rlimit_proc(p, i, &rlim[i]); |
| 2547 | PROC_UNLOCK(p); |
| 2548 | sbuf_bcat(sb, rlim, sizeof(rlim)); |
| 2549 | } |
| 2550 | *sizep = size; |
| 2551 | } |
| 2552 | |
| 2553 | static void |
| 2554 | note_procstat_osrel(void *arg, struct sbuf *sb, size_t *sizep) |
nothing calls this directly
no test coverage detected