UIDINFO(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– 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 the uidinfo hash 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 the uidinfo structure for uid. if no uidinfo structure exists for uid, a brand new structure will be allocated and initialized for you. the uidinfo hash 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 reaches 0 then uip is freed. uip's lock is acquired and released, and the uidinfo hash 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