UIDINFO(9)
π UIDINFO(9) π
ok so this is the Kernel Developer's Manual page for uidinfo, uihashinit, uifind, uihold, and uifree β aka the functions for managing UID information. bestie, this is kernel-land, so hydrate before reading π«Ά
β¨ NAME β¨
uidinfo, uihashinit, uifind, uihold, uifree β functions for managing UID information π
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
void
uihashinit(void);
struct uidinfo *
uifind(uid_t uid);
void
uihold(struct uidinfo *uip);
void
uifree(struct uidinfo *uip);
literally just include the three headers and you're in π
π¦ DESCRIPTION π¦
The uidinfo family of functions is used to manage uidinfo structures. and when I say each uidinfo structure maintains per uid resource consumption counts β I mean it, no cap: that includes the process count and the socket buffer space usage. lowkey iconic bookkeeping π₯
uihashinit()β initializes theuidinfohash table and its mutex. that's the whole job. and heads up: this function should only be called during system initialization. not a "whenever you feel like it" situation πuifind()β looks up and returns theuidinfostructure for uid. if nouidinfostructure exists for uid, a brand new structure will be allocated and initialized for you. theuidinfohash mutex is acquired and released. slay, it's giving concierge service πuihold()β increases the reference count on uip. uip's lock is acquired and released. keep that thing alive, bestie πuifree()β decreases the reference count on uip, and if the count reaches0then uip is freed. uip's lock is acquired and released, and theuidinfohash mutex may be acquired and released. bye diva, you had a good run π¦
β RETURN VALUES β
uifind() returns a pointer to an initialized uidinfo structure, and it should not fail. that's it. that's the whole return section. she's reliable like that π
π AUTHORS π
This manual page was written by Chad David <davidc@acns.ab.ca>. thank you Chad, king behavior π«Ά
that's the whole page!! go forth and manage your UID info, main character β¨
written for the Debian project, dated July 10, 2001 β yeah she's vintage, and she still ate π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms