MCPcopy Create free account
hub / github.com/F-Stack/f-stack / uilookup

Function uilookup

freebsd/kern/kern_resource.c:1346–1361  ·  view source on GitHub ↗

* Look up a uidinfo struct for the parameter uid. * uihashtbl_lock must be locked. * Increase refcount on uidinfo struct returned. */

Source from the content-addressed store, hash-verified

1344 * Increase refcount on uidinfo struct returned.
1345 */
1346static struct uidinfo *
1347uilookup(uid_t uid)
1348{
1349 struct uihashhead *uipp;
1350 struct uidinfo *uip;
1351
1352 rw_assert(&uihashtbl_lock, RA_LOCKED);
1353 uipp = UIHASH(uid);
1354 LIST_FOREACH(uip, uipp, ui_hash)
1355 if (uip->ui_uid == uid) {
1356 uihold(uip);
1357 break;
1358 }
1359
1360 return (uip);
1361}
1362
1363/*
1364 * Find or allocate a struct uidinfo for a particular uid.

Callers 1

uifindFunction · 0.85

Calls 1

uiholdFunction · 0.85

Tested by

no test coverage detected