| 1467 | |
| 1468 | #ifdef RACCT |
| 1469 | void |
| 1470 | ui_racct_foreach(void (*callback)(struct racct *racct, |
| 1471 | void *arg2, void *arg3), void (*pre)(void), void (*post)(void), |
| 1472 | void *arg2, void *arg3) |
| 1473 | { |
| 1474 | struct uidinfo *uip; |
| 1475 | struct uihashhead *uih; |
| 1476 | |
| 1477 | rw_rlock(&uihashtbl_lock); |
| 1478 | if (pre != NULL) |
| 1479 | (pre)(); |
| 1480 | for (uih = &uihashtbl[uihash]; uih >= uihashtbl; uih--) { |
| 1481 | LIST_FOREACH(uip, uih, ui_hash) { |
| 1482 | (callback)(uip->ui_racct, arg2, arg3); |
| 1483 | } |
| 1484 | } |
| 1485 | if (post != NULL) |
| 1486 | (post)(); |
| 1487 | rw_runlock(&uihashtbl_lock); |
| 1488 | } |
| 1489 | #endif |
| 1490 | |
| 1491 | static inline int |
no outgoing calls
no test coverage detected