summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r--sys/kern/kern_resource.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index b6dbab9..4edbcba 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -1356,17 +1356,22 @@ uifree(struct uidinfo *uip)
#ifdef RACCT
void
ui_racct_foreach(void (*callback)(struct racct *racct,
- void *arg2, void *arg3), void *arg2, void *arg3)
+ void *arg2, void *arg3), void (*pre)(void), void (*post)(void),
+ void *arg2, void *arg3)
{
struct uidinfo *uip;
struct uihashhead *uih;
rw_rlock(&uihashtbl_lock);
+ if (pre != NULL)
+ (pre)();
for (uih = &uihashtbl[uihash]; uih >= uihashtbl; uih--) {
LIST_FOREACH(uip, uih, ui_hash) {
(callback)(uip->ui_racct, arg2, arg3);
}
}
+ if (post != NULL)
+ (post)();
rw_runlock(&uihashtbl_lock);
}
#endif
OpenPOWER on IntegriCloud